2021-10-25 09:43 PM
I noticed that the "Home Story Name" property in the General category is not accessible directly in Python, so I was wondering if there is something that I'm missing here.
Could anyone please provide a sample code that extract "General_HomeStoryName" information of each element in python?
2021-10-26 12:08 AM
The "home Story Name" is not available to python scripts.
At Present, there are two workarounds.
You can create a user expression that references element home story and set its availability to all elements or selected Types. Then just reference that custom property. This expression returns the floor string name. The disadvantage is that the property must be ore-configured for all plans of interest.
The other one is to develop a AddOn to return that info via the ExecuteAddOnCommand, in Python and the floorInd attribute in the API_ELEM_HEAD structure in the AddOn API. This attribute returns the floor number. The disadvantage is that the AddOn must be pre-loaded to access it.
2021-10-30 05:52 PM
Thank you for taking the time to read and answer my question. Do you think using Classification could be another work around?
2021-10-30 06:35 PM
Classification could be another work around?
I don't understand your question. The Classification system has nothing to do with the home story property or a expression. Properties,however, are made available to elements via their classification, -- so if you were to use a expression, it would have to belong to the the same classification as was the element(s).
2021-10-30 09:05 PM
I was thinking to create custom classification branches in the classification manager and name the branches similar to story names of the project and assign those classifications to the related elements of the building.
For instance, I will create a classification named "B5", then assign that classification to all the elements in basement 5 of the project. Eventually, by
2021-10-31 12:22 AM
I'm assuming your intent is to just test out Python's capabilities. So yes, if the details are fleshed out, it would work. But if you are just interested in listing all elements on a story -- a schedule would be best and more logical
2021-10-31 03:22 AM
You could also use Properties for this instead of Classification. In fact, I would prefer using Properties to using Classifications for this specific purpose.
2021-10-31 09:52 PM
We have a python script that helps us organize and export schedule values to a spread sheet for our quantity take off purposes. Recently, we've decided to separate values also based on their home story name. Therefore, I'm trying to figure out what is the easiest way and requires the least amount of efforts from our engineers during modeling phase to access that information in python.
2021-10-31 09:55 PM
Thank you very much for taking the time to read and answer my question. Could you please elaborate more on what you are suggesting? are you suggesting to enter "home story name" value of each element as a property during modeling phase? or is that that information is somehow stored somewhere in each element's property?
2021-11-01 02:06 AM
. Therefore, I'm trying to figure out what is the easiest way and requires the least amount of efforts from our engineers during modeling phase to access that information in python.
As mentioned before ,Python does not have access to the Home Story property. Schedules do and , of course does the C++ API. Since you are already using Python to collect the properties that you need, I understand that you only want to include "Home Story". Good news is that ALL elements have a home story property, that's the way Archicad works. Since there is no direct access by Python, just use the indirect method-- as mentioned.
Create a expression in Property Manager, and make it available to all classifications. Set that classification root as one of the classes for all elements, then download that user created property (expression) with your other properties using Python. If you are unsure how to download properties in Python check out the Archicad Python web Site
You might want to make a request to Graphisift to include "Home Story" in the 26 release -- But that would be a year or two away.