Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Section' is an ambiguous reference

3 REPLIES 3
Reply
Message 1 of 4
ebo134
321 Views, 3 Replies

Section' is an ambiguous reference

Hi everyone,

as from the title when I created a class using c# vs2010 pro and through it I used section variable to access every element from a sample line group I had gotten that message:

Section' is an ambiguous reference between 'Autodesk.AutoCAD.DatabaseServices.Section' and 'Autodesk.Civil.Land.DatabaseServices.Section

 

anyone can help me

 

 

 

thanks

 

Tags (1)
3 REPLIES 3
Message 2 of 4
Jeff_M
in reply to: ebo134

You will get the same thing with Surface objects.

Create another using directive with a shortcut alias, such as:

 

using CivDbSvc =  Autodesk.Civil.Land.DatabaseServices;

 

Then when you want to reference the C3D Section object do so like this:

 

CivDbSvc.Section section = (CivDbSvc.Section)tr.GetObject(id, OpenMode.ForRead, false);

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 4
ebo134
in reply to: Jeff_M

thank you so much, its working good.

Message 4 of 4
Jeff_M
in reply to: ebo134

Glad I could help!

If you find a response which answers your question, please be sure to accept the actual post which helped you as the solution. This will help future searchers quickly find answers to their own questions. Thanks!

Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report