Quantcast
Channel: ArchiCAD-Talk - Developer Forum
Viewing all 564 articles
Browse latest View live

Blank Add On for AC19 / DevKit19

$
0
0
Author:adlarch
Posted: Wed Sep 30, 2015 1:09 pm (GMT+1)


After this failed experiment with the Archicad AddOn Wizard, i decided to create my own blank addon template for DevKit 19

Notes:
1- Remember to change the IDs in "/Src/MyDID.h" and "/RFIX/AC_BlankAddOnFix.grc". Explained in detail here.
2- works when placed in the "Examples" folder of the API DevKit.

Hope this is will be of use to those looking for a starting point. Cheers. Adl


Add-On wizard (DevKit 19) generates un-compilable code

$
0
0
Author:adlarch
Posted: Wed Sep 30, 2015 1:13 pm (GMT+1)


While the issue with the Archicad AddOn Wizard is solved by its developers, consider this workaround.

Blank Add On for AC19 / DevKit19

$
0
0
Author:stefan
Posted: Wed Sep 30, 2015 3:20 pm (GMT+1)


Thank you for sharing. I can also suggest to start from the smallest Devkit example: Geometry_Test


It would be nice to have a blank add-in which also compiles on OSX.
_________________
--- 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

[SOLVED] DG::Icon

$
0
0
Author:Rinovo
Posted: Thu Oct 01, 2015 7:17 am (GMT+1)


Looks like icon for DG::Icon can't be changed.
Only icons for buttons or other radio buttons can be changed.

Is it possible to make changeable Icon/picture ?

[SOLVED] DG::Icon

$
0
0
Author:Oleg
Posted: Thu Oct 01, 2015 7:34 am (GMT+1)


Dont mix Icon and IconItem classes.

See IconItem::SetIcon member.

[SOLVED] DG::Icon

$
0
0
Author:Rinovo
Posted: Thu Oct 01, 2015 8:39 am (GMT+1)


Thanks Oleg!

Got it now ! Smile

Add-On wizard (DevKit 19) generates un-compilable code

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 8:30 am (GMT+1)


adlarch wrote:
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!


Please add an #include <windows.h> to the include section in the .cpp file.

Best, Akos

Push Menu Control, UC259

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 8:48 am (GMT+1)


Rinovo wrote:
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 ?


Hi,

Sorry, but UC259 doesn't support that layout.

Best, Akos


Debug exceptions

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 8:51 am (GMT+1)


MarkHenryC wrote:
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.



Hi,

ARCHICAD does install a low level exception handler, you can't do much about that.

Ralph's suggestion is the good one, just adjust your debugger to stop when an exception is thrown.

Having a local try-catch block should work; so in your case I think you have a different kind of exception (a non-C++ one), like an access violation.

Best, Akos

Image format

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 8:53 am (GMT+1)


Rinovo wrote:
Dialog items support only 8-bit images ?


Which type? The Picture type does support 32-bit images, AFAIK. You'll have to specify a GBMP resource for that, not a GICN.

Best, Akos

Add_On order

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 9:04 am (GMT+1)


Cosminn wrote:
Hello everyone,
My name is Daniel. I am looking for someone to help me to create an addon for ArchiCad. I am Not sure if here is the right place to ask.
Any advices are greatly appreciated.


Hi Daniel,

The GRAPHISOFT developer site should get you started.

Best, Akos

Push Menu Control, UC259

$
0
0
Author:Rinovo
Posted: Fri Oct 02, 2015 9:09 am (GMT+1)


Thanks Akos!

Maybe in future it might be possible to add options to show Push Menu Controls in rows or columns .. Smile

Image format

$
0
0
Author:Rinovo
Posted: Fri Oct 02, 2015 9:44 am (GMT+1)


Thanks Akos,

Yes i was using GICN.
But GBMP is only usable with 'STR#' menu or with 'GDLG' dialog also ?

I specified my picture as GBMP but for unknown reason i get error "file not found"

Code:
'GBMP' 32500 "picture" {
         "picture"
}

RFIX/Images/picture.bmp

Notify Manager - New Attribute?

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 12:20 pm (GMT+1)


MarkHenryC wrote:
Any info on where this AttributeSet class is defined?


This is not part of the public API; what do you need that for?

Best, Akos

Create library (LibPart) based on an existing one

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 12:23 pm (GMT+1)


ReignBough wrote:
I am trying to create a library from an existing one. What I did was just get all the information from the "source" library then copy (and modify) them. I am able to do this but limited to some section. Based on the documentation, ACAPI_LibPart_GetSection() will return APIERR_BADPARS for pictures, macros, etc.

I also followed the example given at the documentation of ACAPI_LibPart_GetSectionList(), modify it so that I will create a "destination" library.

When I called ACAPI_LibPart_GetSection(), I got APIERR_BADPARS and APIERR_NOLIBSECT on some of the sections. This means that the list that I got form ACAPI_LibPart_GetSectionList() have a "non-existing" section; or (as I interpret it) the section exists but the sectionHdl and sectionStr are not valid.

So how am I to copy [, create, and/or modify] these sections:

Sections with APIERR_BADPARS:
* API_SectAncestors
* API_SectCalledMacros
* API_SectInfoGIF

Sections with APIERR_NOLIBSECT:
* API_SectMigrTable
* API_SectCust_Keywords ('KWRD', this section is part of the section list but not part of the definitions, #define API_Sect...)
* API_SectCopyright

EDIT

I am also unable to find how to set/get values for the LibPart:
* Details > Author (see EDIT (2015 Aug 24))
* Details > Compatibility Options... (see EDIT (2015 Aug 19))

EDIT (2015 Aug 19)

I am now able to copy "Details > Compatibility Options..." via:
Code:
ACAPI_LibPart_GetDetails(oldLibPartIdx, &detl);
...
ACAPI_LibPart_SetDetails_ParamDef(&newLibPart, paramsHdl, &detl);


EDIT (2015 Aug 24)

Based on the binary data of the library, the "Details > Author" is part of the copyright section. But since there is an error, this is not saved. I also tried saving this binary data as GSHandle and call save section API, but still error.


Hi,

Why would you like to copy an existing library part? The copyright section is there for a reason Smile

Best, Akos


AddOnAdmin.exe say "DevKit Version: Undefined (Undefined rel

$
0
0
Author:Akos Somorjai
Posted: Fri Oct 02, 2015 12:26 pm (GMT+1)


Tsepov wrote:
Hello!
Please help me.
On win DevKit for AC 17,18,19
when i use GX::Image(..., i have e message on AddOnAdmin.exe
"DevKit Version: Undefined (Undefined release)"
When i comment GX::Image(... line - all in green.

And this message in gray i resived when compile example "Element_Test" wehe is record GX::ImageBase(...
But all my addons loaded and work properly.
Only AddOnAdmin.exe say in gray.

On Mac all work in green. Only in win i have gray.


You'll have to put the GXImage.DLL (and probably GX.DLL and GXImageBase.DLL as well) beside the AddOnManager tool.
The AddOnManager tries to load the add-on (which refers to the GXImage.DLL), but it can only find the DLLs beside itself.

Best, Akos

Add_On order

$
0
0
Author:Cosminn
Posted: Fri Oct 02, 2015 3:11 pm (GMT+1)


Thank you Akos,

Best regards,
Daniel

Notify Manager - New Attribute?

$
0
0
Author:MarkHenryC
Posted: Fri Oct 02, 2015 8:49 pm (GMT+1)


I was hoping it might provide a notification when layer status has changed, such a hiding or showing. If done via main menu there's no notification.

AddOnAdmin.exe say "DevKit Version: Undefined (Undefined rel

$
0
0
Author:Tsepov
Posted: Sat Oct 03, 2015 8:43 am (GMT+1)


Thank you very much!
It works!
_________________
ArchiCAD - The Best!!!

APIERR_MEMFULL LibPart_Register

$
0
0
Author:Rinovo
Posted: Thu Oct 08, 2015 7:35 am (GMT+1)


Code:
IO::Location     fileLoc ("C:\\temp\\MyLibpart.gsm");
API_LibPart      libPart;
GSErrCode        err;
 
BNZeroMemory (&libPart, sizeof (API_LibPart));
libPart.typeID   = APILib_ObjectID;
libPart.location = &fileLoc;
err = ACAPI_LibPart_Register (&libPart);


Any ideas why i'm getting MEMFULL error ?

Viewing all 564 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>