September 8, 2015, 11:59 pm
Author:
MarkHenryC
Posted: Wed Sep 09, 2015 7:59 am (GMT+1)
Is there a way to get the location of a source IES light file? When reading the ParameterList data of the lights in a BaseElement, the actual file name is listed in the C4D_PHO_FILE field but no source path.
I'd like to either get the path to the original file or the imported content.
I'm creating the IES light by using the ArchiCAD library part "IES Light 18.gsm" and setting the Photometric File Name field to the IES file I'm importing. (I need the IES info for an external renderer.)
Any tips appreciated.
↧
September 9, 2015, 6:53 am
Author:
Rinovo
Posted: Wed Sep 09, 2015 2:53 pm (GMT+1)
Hello!
Code: |
DGModalDialog (ACAPI_GetOwnResModule (), UserControl, ACAPI_GetOwnResModule (), UserControl_Handler, (DGUserData) &numItems); |
When UserControl is initialized like this it works.
But i need to initialize it into my Modal dialog.
Code: |
DG::ModalDialog (ACAPI_GetOwnResModule (), dialogResId, ACAPI_GetOwnResModule()), |
But when opening userControl data menu data doesn't apear.
I tried to do like this :
Code: |
UC257SetUserData (dialogID, Itm, (DGUserData)&numItems); UC257SetCallBack (dialogID, Itm, UserControlCallBack); DGSetItemValLong (dialogID, Itm, 1); |
CallBack seems to work, when i try to open menu it initializes but somewhere in middle of setting data it doesn't work.
Problem might be somewhere in callBack. Not sure why it worked in DGModalDialog and not in DG::ModalDialog.
CallBack:
Code: |
void CCALL UserControlCallBack (UC257CallBackRec* callBackRec) { if (callBackRec->action == ACT_GETLISTSIZE || callBackRec->action == ACT_GETITEMSIZE) FillGetListSize (callBackRec, false); else if (callBackRec->action == ACT_GETLIST || callBackRec->action == ACT_GETITEM) FillGetList (callBackRec, false); return; }
|
callBackRec is giving errors not sure why and how does it works
↧
↧
September 9, 2015, 10:02 am
Author:
Oleg
Posted: Wed Sep 09, 2015 6:02 pm (GMT+1)
Actually It is wrong to mix C++ DG classes and plain C DG module functions.
Below is cutted source code of UC257 usage as a Pen control.
Note the ACAPI_Interface ( APIIo_SetUserControlCallbackID ) function, API_UCCallbackType struct, API_UserControlType enum. It is for AC standard lists like Pen, LineType etc. Full
More:
Look the DG_Test example of AC19 API
BuildingMaterialObserver class in BuildingMaterialDialog.hpp and cpp.
I dont study this example but I think it will basically same in more details.
Code: |
...
#include "UCModule.hpp"
...
class TabWallAttrs : public DG::TabPage , private DG::UserControlObserver {
public:
...
private:
virtual void UserControlChanged (const DG::UserControlChangeEvent& ev);
private:
UC::UC257 mi_pcont; };
|
Code: |
TabWallAttrs::TabWallAttrs( ... ) , mi_pconte( GetReference(), PCONTE ) { mi_pcont.Attach( *this );
API_UCCallbackType ct = { APIUserControlType_Pen, GetId(), mi_pcont.GetId() }; ACAPI_Interface ( APIIo_SetUserControlCallbackID, &ct, NULL ); }
TabWallAttrs::~TabWallAttrs() { mi_pcont.Detach( *this ); }
void TabWallAttrs::UserControlChanged (const DG::UserControlChangeEvent& ev) { if ( ev.GetSource() == &mi_pcont ) { // mi_pcont.GetValue() } }
|
↧
September 9, 2015, 10:20 am
Author:
Oleg
Posted: Wed Sep 09, 2015 6:20 pm (GMT+1)
I think you dont need to use SetHeaderItemCount and SetHeaderItemSize.
Look at SetTabFieldCount and SetTabFieldProperties.
↧
September 10, 2015, 5:29 am
Author:
Rinovo
Posted: Thu Sep 10, 2015 1:29 pm (GMT+1)
Thanks Oleg!
Had defined UserControl under DG::UserControl class but UC::UC257 gives a lot more options.
Got it working now.
↧
↧
September 11, 2015, 12:47 am
Author:
MarkHenryC
Posted: Fri Sep 11, 2015 8:47 am (GMT+1)
To continue the conversation with myself, I can locate the library item that represents the IES file and was hoping to retrieve the custom data via ACAPI_LibPart_GetSection. But I'm not sure what kind of data ID I need to pass in. I've tried most of the standard ones (the 4-char codes) but I may be doing something else wrong.
When I export the light and convert to XML it doesn't look like the IES info is there.
↧
September 11, 2015, 7:36 am
Author:
laszlonagy
Posted: Fri Sep 11, 2015 3:36 pm (GMT+1)
Well, in that case I merge the two topics to ease this conversation. ![Wink]()
Sorry, I cannot answer your questions I am not a C++ programmer.
_________________
Laszlo Nagy, Moderator, Site Admin
ASUS G73SW, i7-2630QM 16 GB RAM
17.3" (1920x1080), NVidia GTX 460M 1.5 GB RAM
60 GB SSD, 750 GB HDD, Win7-64 ENG
AC13-AC19 (64-bit, latest build)
Loving ArchiCAD since 1995
↧
September 14, 2015, 6:23 am
Author:
Rinovo
Posted: Mon Sep 14, 2015 2:23 pm (GMT+1)
Couldn't found a way to show only specific colors/index, access data of UC257.
How could i access and show only specific colors ?
Quote: |
Code: | mi_pcont.Attach( *this );
API_UCCallbackType ct = { APIUserControlType_Pen, GetId(), mi_pcont.GetId() }; ACAPI_Interface ( APIIo_SetUserControlCallbackID, &ct, NULL ); |
|
↧
September 16, 2015, 5:05 am
Author:
ggiloyan
Posted: Wed Sep 16, 2015 1:05 pm (GMT+1)
Hi
My goal is to zoom selected element. I know how to select and zoom with GUID but now I have no GUID. I have to zoom selected element/s.
Thanks in advance.
↧
↧
September 17, 2015, 1:13 am
Author:
stefan
Posted: Thu Sep 17, 2015 9:13 am (GMT+1)
The Automate_Functions Devkit example has a method implemented:
Do_ZoomToSelected
_________________
--- stefan boeykens --- architect-engineer-musician ---
ArchiCAD18-19/Revit2015/SketchUp2015/Cinema4D16/Rhino5/Unity5
rMBP15:i7Quad2.3Ghz+16GB+nVidia650M/Yosemite+Win8.1/64
http://bit.ly/17u87df
↧
September 18, 2015, 5:28 am
Author:
Rinovo
Posted: Fri Sep 18, 2015 1:28 pm (GMT+1)
Dialog items support only 8-bit images ?
↧
September 21, 2015, 10:40 pm
Author:
MarkHenryC
Posted: Tue Sep 22, 2015 6:40 am (GMT+1)
I'm guessing ArchiCAD installs a low-level hook (I'm on Win 7) to catch exceptions. This makes it hard to identify where the problem occurs in the plugin, as AC takes over & displays call stack etc. Is there any way to switch this off for a debugging session?
↧
September 21, 2015, 11:43 pm
Author:
ggiloyan
Posted: Tue Sep 22, 2015 7:43 am (GMT+1)
stefan wrote: |
The Automate_Functions Devkit example has a method implemented:
Do_ZoomToSelected |
Thank you for the response.
↧
↧
September 22, 2015, 6:23 am
Author:
Ralph Wessel
Posted: Tue Sep 22, 2015 2:24 pm (GMT+1)
MarkHenryC wrote: |
I'm guessing ArchiCAD installs a low-level hook (I'm on Win 7) to catch exceptions. This makes it hard to identify where the problem occurs in the plugin, as AC takes over & displays call stack etc. Is there any way to switch this off for a debugging session? |
Do you mean ARCHICAD is exiting without giving you a chance to debug at the point of failure? You can set the debugger to break at the point where an exception is thrown (and specify which types of exceptions you're interested in). Is that what you're after?
_________________
Ralph Wessel
Cadimage
↧
September 22, 2015, 12:36 pm
Author:
MarkHenryC
Posted: Tue Sep 22, 2015 8:36 pm (GMT+1)
Yes that's the problem I'm having. It will jump to AC's handler, even if I bracket an error in a try/catch block.
But you're right, I probably have to tweak my debug settings. I don't have them on "full" as there are a number of harmless first-chance exceptions thrown outside of my code.
↧
September 23, 2015, 2:59 am
Author:
ggiloyan
Posted: Wed Sep 23, 2015 10:59 am (GMT+1)
Hi
Why my menu items are disabled in 3D mode ?
Is there any solution to use my add-on functions in 3D mode ? and Can I check if 3D switched by C++ ?
Thanks in advance!
↧
September 23, 2015, 5:27 am
Author:
Oleg
Posted: Wed Sep 23, 2015 1:27 pm (GMT+1)
Look at Structure of an Addon/Required Resources topic of the API documentation.
You need ^E3 suffix for the menu item resource string
↧
↧
September 23, 2015, 10:08 pm
Author:
ggiloyan
Posted: Thu Sep 24, 2015 6:08 am (GMT+1)
Oleg wrote: |
Look at Structure of an Addon/Required Resources topic of the API documentation.
You need ^E3 suffix for the menu item resource string |
Thanks!
↧
September 25, 2015, 1:28 am
Author:
Rinovo
Posted: Fri Sep 25, 2015 9:28 am (GMT+1)
Hello!
I need something like Push Menu Control, but for icons to show in rows not in columns. UC259 can be shown in rows, but it has no push menu option, it just shows icons in rows.
Any ideas how i could get something like Push Menu Control except showing icons in rows not columns ?
↧
September 29, 2015, 5:12 am
Author:
adlarch
Posted: Tue Sep 29, 2015 1:12 pm (GMT+1)
Hello, I'm new to the world of AC add-on development so please bear with me and sorry if this question has been addressed elsewhere... (i searched the best i could)
I managed to compile the example add-ons with VS2010, and successfully ran them in AC19
As i like to start with a clean slate, i took a look over the Add-On Wizard. Here are the build errors i get...
Code: |
1>------ Build started: Project: ACAddOn1, Configuration: Debug x64 ------
1>Build started 2015-09-29 3:07:13 PM.
1>InitializeBuildStatus:
1> Touching "x64\\ACAddOn1.unsuccessfulbuild".
1>CustomBuild:
1> All outputs are up-to-date.
1>ClCompile:
1> ACAddOn1.cpp
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(54): error C2143: syntax error : missing ',' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(55): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(55): error C2143: syntax error : missing ',' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(84): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(84): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(84): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(85): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(85): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(85): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(86): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(86): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(86): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(87): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(87): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(87): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(88): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(88): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(88): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(89): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(89): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(89): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(90): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(90): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(90): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(91): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(91): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(91): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(92): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(93): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(93): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(94): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(94): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(94): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(95): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(95): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(95): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(96): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(96): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(96): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(97): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(97): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(97): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(98): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(98): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(98): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(99): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(99): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(99): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(100): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(100): error C2143: syntax error : missing ';' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(100): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(113): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(113): error C2143: syntax error : missing ',' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(161): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(161): error C2143: syntax error : missing ',' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(163): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(163): error C2143: syntax error : missing ',' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(164): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(164): error C2143: syntax error : missing ',' before '*'
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(187): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\graphisoft\api development kit 19.3003\support\modules\gsroot\RS.hpp(187): error C2143: syntax error : missing ',' before '*'
1>C:\Program Files\GRAPHISOFT\API Development Kit 19.3003\Support\Inc\ACAPinc.h(123): error C2143: syntax error : missing ';' before '__cdecl'
1>C:\Program Files\GRAPHISOFT\API Development Kit 19.3003\Support\Inc\ACAPinc.h(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\GRAPHISOFT\API Development Kit 19.3003\Support\Inc\ACAPinc.h(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\GRAPHISOFT\API Development Kit 19.3003\Support\Inc\ACAPinc.h(125): error C2143: syntax error : missing ';' before '__cdecl'
1>C:\Program Files\GRAPHISOFT\API Development Kit 19.3003\Support\Inc\ACAPinc.h(125): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\GRAPHISOFT\API Development Kit 19.3003\Support\Inc\ACAPinc.h(125): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(97): error C2065: 'CALLBACK': undeclared identifier
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(97): error C2065: 'LPFNPSPCALLBACKA': undeclared identifier
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(97): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\prsht.h(97): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.96
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
Some of the missing types are "WCHAR", "HINSTANCE", "HWND"... the funny thing is that when I try to find the definitions using VS2010 "find definition" function it finds them....
Any help is greatly appreciated!
↧