Reading Cad Linked object

Reading Cad Linked object

thannaingoo.bim.mep
Contributor Contributor
1,818 Views
1 Reply
Message 1 of 2

Reading Cad Linked object

thannaingoo.bim.mep
Contributor
Contributor

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

0 Likes
Accepted solutions (1)
1,819 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

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 } } }
0 Likes