I’m looking to automate some asset management assignment and have successfully converted the data I need to JSON and have used the JSON > PSETs graph to bring in Property Set definitions.
I want to use Python to automate assignment of properties to objects and want to read more about what classes, methods, properties are associated with Autodesk.Aec.PropertyData but cannot find it anywhere. I couldn’t find it in the AutoCAD or C3D API documentation, and whenever I try to look for the ACA/AMEP documentation I get a bunch of dead ends like this one: AutoCAD Architecture and MEP Developer Center. Most google searches for “Autodesk.Aec.PropertyData” point back to this forum because of code embedded in topic discussions.
Am I just missing something or is there really no documentation online?
Hi Kirk! To clarify I’m interested in Property Sets. I can see that in Paolo’s pset_utils.py these two references are called so in order to further make use of them,
# Import references for PropertySets
from Autodesk.Aec.PropertyData import *
from Autodesk.Aec.PropertyData.DatabaseServices import *
I want to know what methods and properties I can call/use in a Python node, but can’t find documentation. For example, one thing I want to (if it’s possible) is to set certain Property definition defaults based on a datatype and I’d like to do it programmatically on the import of the JSON data.
Using that I was able to tweak Paolo’s PSET python files to include the ability to import and map Defaults by editing to pset_serialization.py and pset_utils.py by adding the following lines in their appropriate locations:
In pset_serialization.py I added the following code to the civil_decoder function.
output.DefaultData = data['Default']
In pset_utils.py I added the following code after line 106.
pd.DefaultData = jpd.DefaultData
I still want to explore what’s available via the API for Property Sets, so if anyone knows anything, I’m all ears.
Now if I define a “Default” field in my JSON file it gets imported and mapped!
As far as I know, you have to install AutoCAD Architecture to get access to the help file. I’ve never found it online. You should have access as part of the AEC Collection if your company subscribes to that. Also FYI the documentation hasn’t been updated since 2011, so no guarantees that it is complete.
Look for the acamgd.chm file in C:\Program Files\Autodesk\AutoCAD <version>\Help.
Super clutch find, that is exactly what I needed! The irony is that I went and installed ACA, realized the Help was all online. Then I went and found the local version,Download & Install AutoCAD Architecture 2021 Product Help, but when I loaded it, the developers pages all pointed back online
But when I did a search for the file you mentioned, it did install that CHM file, since of all the versions of AutoCAD-based products I have, only 2021 (which is the ACA version I installed) had that file. That had everything I needed, even if it’s only been last updated in 2011
Thanks for sharing this, its really useful and makes finding out properties and methods for not very well documented materials easier to work with! I’ll be sure to add it to mental toolbox
A big part of why they aren’t documented is the lst they are designed to be used in a programming interface which helps explore this stuff more directly.
Remember that each object can be inspected, including the methods and properties themselves. If you look at the __DOC__ for (spelling is off there - might be all lowercase) property of such you’re get a rather nice description of each.
ACA Help.7z (7.3 MB) @k.meza This should help, just unzip the file and open the ‘acamgd.chm’ file and you should have all the API documentation for Property Sets.