Hello,
I'm trying to access the details one can define inside of the project configuration to handle their own field definitions for annotations.
I'm able to get the headers (folders) in the project configuration, but not the subdetails with their values. Is there a way to do this within the api or do I have to read the xml / apj file directly ? ;-(
Project _proj = null;
SetupProject ();
...
foreach (ProjectKey item in _proj.Configuration.StringProperties)
{
foreach (var subitem in item. ??)
{
.... ???
}
}
Thanks a lot,
Tim
Solved! Go to Solution.
Hi,
I'm not sure which product is that... despite you posted on AutoCAD blog, seems like Plant3d... can you clarify?
Hello Augusto,
I've found a solution to access the Details in Project Setup for AutoCAD Architecture and AutoCAD MEP:
foreach (ProjectStringProperty item in _proj.Configuration.StringProperties)
{
foreach (StringPair strpair in item.StringPairs)
{
string res = String.Format("[PROJ_DETAIL_{0}_{1}]", item.Name.ToUpper(), strpair.Left.ToUpper());
res = res.Replace(" ", "_");
_parameterColl.Add(res, strpair.Right);
}
}
But in general this Project API is more or less try and error... Took me some time to figure out, that StringProperties hold the ProjectDetails Collection 😉 Maybe you can add a wish to the list to rename this Property?
And some examples for this API would be fine in ACA/samples,
Thanks a lot,
Tim
Can't find what you're looking for? Ask the community or share your knowledge.