We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

"Super Part" Property Selection....

Anonymous
Not applicable
I have created several "super parts" and I'm in the process of creating another. Is it possible to script parameters in the part to select a defined property by a series of criteria? For example a wood joist: width= 5 1/2", height=7 1/4" and the length is between 12' and 14'. The part would use the named property? How would I and where would I script something like that? Thanks.

Barry Halloran
6 REPLIES 6
Karl Ottenstein
Moderator
Barry wrote:
I have created several "super parts" and I'm in the process of creating another. Is it possible to script parameters in the part to select a defined property by a series of criteria? For example a wood joist: width= 5 1/2", height=7 1/4" and the length is between 12' and 14'. The part would use the named property? How would I and where would I script something like that? Thanks.
Hi Barry,

Are you saying that you want the script to decide what Property Object is linked to the library part? If so, then no. The linkage mechanism is all done view the Calculate menu. That linkage is not based on parameter values, but on attributes. (The options look very much like those for Find and Select.)

If you are saying that you want different components and descriptors generated depending on parameters, then you just code that in the Property Script for the library part. Be as parametric as you want. 😉

[Confusing terminology: all objects can have an optional Property Script that directly generates components and/or descriptors. Property Objects are special objects, with a Property Script, that are linked (by user-defined rules) to elements and generate components and/or descriptors.

You cannot write a property script for a standard AC element such as a wall or slab ... so Property Objects give you a way of associating a script with those elements.

Just to add to the confusion... but there is some power here ... you can link Property Objects to GDL objects (library parts), too ... doors, windows, objects. Each of these objects could have its own Property Script. I haven't tested to see what happens when an object has a Property Script AND it has a linked Property Object. I assume that both scripts execute and you could get components/descriptors from each.]

Having fun yet? 😉

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Karl,

Thanks for your info. I was hoping to make the part as intuitive as possible, but I guess it will have to be up to the drafter to make sure the correct property is associated to the part. I tried linking the property based on the criteria under the calculation menu, but there is no option for length in the choices. Since each beam will have several length choices, I will have to rely on the drafters. Thanks for your let down....

Barry Halloran
Anonymous
Not applicable
Karl,

I just read your reply a few more times. Are you saying it is possible to script in the property script a set of parameters that directly connects to the database? Using my previous example: a 6x8x14 beam. I could use a series of IF THEN statements that would point to the componant I created in the database that corresponds to a 6x8x14 beam? This would mean if I was counting each piece I would not need to create a specific property part for items, I could just hard script it in the part? I believe your other question about having both a scripted componant and a property linked works. I am using a the log home solution that has materials generated by the solution set and I have linked properties to the same parts and both generate. How do I script in the property script to choose a componant? What parameter do I tell it to look for?(ie the componant number, name???) Thanks again.

Barry
Karl Ottenstein
Moderator
Barry wrote:
Are you saying it is possible to script in the property script a set of parameters that directly connects to the database?
Yes... logic (IF THEN) based on parameters and computations that is used to either generate directly the desired component, or to retrieve it from the database.
Using my previous example: a 6x8x14 beam. I could use a series of IF THEN statements that would point to the componant I created in the database that corresponds to a 6x8x14 beam? This would mean if I was counting each piece I would not need to create a specific property part for items, I could just hard script it in the part?
Yes. (And to clarify for passersby... Barry is talking about a GDL Object that is a beam, not a beam placed with the beam tool. A beam tool beam has to be handled via a linked Property Object.)
I believe your other question about having both a scripted componant and a property linked works. I am using a the log home solution that has materials generated by the solution set and I have linked properties to the same parts and both generate.
Good to know. Thanks. Figured it would, but you know how what you expect isn't always what happens! 😉 This functionality could be "dangerous", if things were counted more than once ... or it could be quite powerful by handling the general in the property object and the specific in the object's own property script.
How do I script in the property script to choose a componant? What parameter do I tell it to look for?(ie the componant number, name???) Thanks again.
You're welcome. 😉

I hate to send you to a GDL class, but from another post you made, I think that is really your next step. (Or working through the Cookbook on your own.) Hard to teach it all via this forum ... classroom setting works a lot better.

You can directly generate components or descriptors with COMPONENT and DESCRIPTOR commands, or you can use the REF commands to retrieve them from a loaded database. (See REF COMPONENT and REF DESCRIPTOR in the GDL manual.)

See also DATABASE_SET and the appendix on Property GDL Add-On for retrieving info from a database.

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Anonymous
Not applicable
Karl,

Thanks for your info. I do have the Cookbook and I'll look up the info you gave. Thanks again for pointing me in the right direction. I'll let you know how I make out.

Barry
Karl Ottenstein
Moderator
A followup thread on REF COMPONENT syntax is in the GDL forum for anyone following this thread:
http://archicad-talk.graphisoft.com/viewtopic.php?p=34333#34333

Karl
One of the forum moderators
AC 28 USA and earlier   •   macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB