.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Accessing Project Navigator Details with .Net

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
THoffeller
698 Views, 3 Replies

Accessing Project Navigator Details with .Net

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

3 REPLIES 3
Message 2 of 4

Hi,

 

I'm not sure which product is that... despite you posted on AutoCAD blog, seems like Plant3d... can you clarify?

 

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 3 of 4

Hi, it is for AutoCAD Architecture and AutoCAD MEP Project Navigator.

Thanks,

Tim
Message 4 of 4

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.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost