Add-on development (API DevKit 21)
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-10 10:13 AM - last edited on ā2022-12-06 01:59 PM by Daniel Kassai
ā2017-08-10
10:13 AM
Hello,
I would like to develop an addOn which get all the elements of a wall in order to use them to generate automatically an object I created before. I am a begginer and it'd be nice if I can receive some assistance
Thank you for your help !
Regards.
I would like to develop an addOn which get all the elements of a wall in order to use them to generate automatically an object I created before. I am a begginer and it'd be nice if I can receive some assistance
Thank you for your help !
Regards.
Labels:
- Labels:
-
Add-On (C++)
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-10 01:01 PM
ā2017-08-10
01:01 PM
Hello,
If I understand you well, you'd like to reuse the settings of a previously placed Wall instance to create similar new ones.
This can be done by creating a favorite with the ACAPI_Favorite_Create function, and then using it to fill the default
settings of a new element with the ACAPI_Favorite_GetDefaults function.
If you want to reuse the settings directly without creating a favorite, you can use the ACAPI_Element_Change function
with the withdel argument set to false. This way, the function creates a copy of the wall, and applies the changes to
the copied element.
Best regards,
DĆ©nes
If I understand you well, you'd like to reuse the settings of a previously placed Wall instance to create similar new ones.
This can be done by creating a favorite with the ACAPI_Favorite_Create function, and then using it to fill the default
settings of a new element with the ACAPI_Favorite_GetDefaults function.
If you want to reuse the settings directly without creating a favorite, you can use the ACAPI_Element_Change function
with the withdel argument set to false. This way, the function creates a copy of the wall, and applies the changes to
the copied element.
Best regards,
DĆ©nes
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-10 02:18 PM
ā2017-08-10
02:18 PM
dfintha wrote:Hello,
Hello,
If I understand you well, you'd like to reuse the settings of a previously placed Wall instance to create similar new ones.
This can be done by creating a favorite with the ACAPI_Favorite_Create function, and then using it to fill the default
settings of a new element with the ACAPI_Favorite_GetDefaults function.
If you want to reuse the settings directly without creating a favorite, you can use the ACAPI_Element_Change function
with the withdel argument set to false. This way, the function creates a copy of the wall, and applies the changes to
the copied element.
Best regards,
DĆ©nes
Thank you for your answer. I talked to my friend and he would like to get information from a wall (length,height,number of windows, position, etc...) and then, I will draw it in GDL. To sum up, I need a fonction that would allow me to get this information in order to use it in GDL code (just like the wall accessories addon but with my own object, not a Wall Framing object) .
I'm still searching but if you have an idea, it would be great !
Best regards.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-23 03:18 PM
ā2017-08-23
03:18 PM
dfintha wrote:Hello,
Hello,
If I understand you well, you'd like to reuse the settings of a previously placed Wall instance to create similar new ones.
This can be done by creating a favorite with the ACAPI_Favorite_Create function, and then using it to fill the default
settings of a new element with the ACAPI_Favorite_GetDefaults function.
If you want to reuse the settings directly without creating a favorite, you can use the ACAPI_Element_Change function
with the withdel argument set to false. This way, the function creates a copy of the wall, and applies the changes to
the copied element.
Best regards,
DĆ©nes
Thank you DĆ©nes for your answer !
I'm interesting in these functions, however, there is no examples on the website and I don't know how to use them. I'm still searching but can you give me an example of their use please. That would help me much.
Best Regards.
CĆ©dric.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-08-24 01:01 PM
ā2017-08-24
01:01 PM
Hello,
If you'd like to use values calculated in your C++ code, your best choice might be using parameters describing these values
in your GDL object, and then creating an Object instance with your Library Part and customized parameters.
To do so, you'll have to use ACAPI_LibPart_Search to find your Library Part's index, ACAPI_LibPart_GetParams to get the
default parameter list, which you can change for the instance to be placed, and ACAPI_Element_Create to create an object instance.
Documentation for these functions can be found in the installed DevKit's Documentation folder, or
at http://archicadapi.graphisoft.com. The latter requires you to log in to the site.
Best regards,
DĆ©nes
If you'd like to use values calculated in your C++ code, your best choice might be using parameters describing these values
in your GDL object, and then creating an Object instance with your Library Part and customized parameters.
To do so, you'll have to use ACAPI_LibPart_Search to find your Library Part's index, ACAPI_LibPart_GetParams to get the
default parameter list, which you can change for the instance to be placed, and ACAPI_Element_Create to create an object instance.
Documentation for these functions can be found in the installed DevKit's Documentation folder, or
at http://archicadapi.graphisoft.com. The latter requires you to log in to the site.
Best regards,
DĆ©nes
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā2017-10-04 09:43 AM
ā2017-10-04
09:43 AM
dfintha wrote:Thank you,
Hello,
If you'd like to use values calculated in your C++ code, your best choice might be using parameters describing these values
in your GDL object, and then creating an Object instance with your Library Part and customized parameters.
To do so, you'll have to use ACAPI_LibPart_Search to find your Library Part's index, ACAPI_LibPart_GetParams to get the
default parameter list, which you can change for the instance to be placed, and ACAPI_Element_Create to create an object instance.
Documentation for these functions can be found in the installed DevKit's Documentation folder, or
at http://archicadapi.graphisoft.com. The latter requires you to log in to the site.
Best regards,
DĆ©nes
I understand the steps but I don't manage to search my library part. I tried to create a LibPart variable and modify his file name. However, I can't modify it because the type of the filename is GS:uchar_t and I don't understand how to use it (there is no documentation of this type in the site). Can you help me with this step please ?
Thank you for your answers.
Best regards.