Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reading Cad Linked object

1 REPLY 1
SOLVED
Reply
Message 1 of 2
thannaingoo.bim.mep
1568 Views, 1 Reply

Reading Cad Linked object

Dear All Developer,

 

 

Kindly help me, How to read link CAD'circle coordinate in revit API?

How to red link CAD layer name?

 

Thanks Advance,

Naing Oo

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: thannaingoo.bim.mep

Hello,

I am working ini a tool to extract blocks and its information from an imported CAD file.

I paste a piece of code and I hope that it helps you

 

 

 

			Reference refer = selection.PickObject(ObjectType.Element, "Select a CAD Link");
			Element elem = doc.GetElement(refer);
			GeometryElement geoElem = elem.get_Geometry(new Options());
			
			
			foreach (GeometryObject geoObj in geoElem)
			{
				GeometryInstance instance = geoObj as GeometryInstance;
				foreach (GeometryObject instObj in instance.SymbolGeometry)
				{
					
					if (instObj.GetType().Name == "GeometryInstance")
					{
//IT IS A BLOCK } } }

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

Post to forums  

Autodesk Customer Advisory Groups


Rail Community