.NET

Reply
Active Member
Posts: 8
Registered: ‎10-27-2007
Message 1 of 4 (198 Views)
Accepted Solution

Accessing Project Navigator Details with .Net

198 Views, 3 Replies
09-30-2013 06:40 AM

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

ADN Support Specialist
Posts: 288
Registered: ‎04-30-2009
Message 2 of 4 (149 Views)

Re: Accessing Project Navigator Details with .Net

10-03-2013 11:53 AM in reply to: THoffeller

Hi,

 

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

 

Regards,



Augusto Goncalves
Autodesk Developer Network
Active Member
Posts: 8
Registered: ‎10-27-2007
Message 3 of 4 (104 Views)

Re: Accessing Project Navigator Details with .Net

10-17-2013 08:54 AM in reply to: augusto.goncalves
Hi, it is for AutoCAD Architecture and AutoCAD MEP Project Navigator.

Thanks,

Tim
Active Member
Posts: 8
Registered: ‎10-27-2007
Message 4 of 4 (104 Views)

Re: Accessing Project Navigator Details with .Net

10-17-2013 09:00 AM in reply to: augusto.goncalves

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community