Howdy! I want to create a Property for objects I create, but for some reason I am having issues. I am running Civil3d 2024, Dynamo v.2.19.4 © 2023.
In order to add a PropertySetDefinition I need to access the dictionary of said definitions within the document. I tried These code snippets without success.
from Autodesk.Aec.PropertyData.DatabaseServices import *
from Autodesk.Aec.PropertyData import *
And then:
PropSetDefDictName = "AecDbPropertySetDefinitions"
NOd = tr.GetObject(db.NamedObjectsDictionaryId, OpenMode.ForRead)
psd_dict = tr.GetObject(NOd.GetAt(PropSetDefDictName), OpenMode.ForRead)
Or:
PropSetDictionary_id = PropertySetDefinition.GetPropertySetDefinitions(db)
(then get dictionary with id, and find the property set I want within it or if it exists)
All of these fail. I also tried an approach of looking for the objects first, and if the list is empty, then I try to create the definition. But this node itself errored out
Basically, what is the right approach to create, and then add a propertyset to objects I make? the AI has not given me stuff that works. Thank you!
