Hi,
I've already contributed an answer:
Revitalizer
Hi Revitalizer,
it's clear from the above link you got the solution, but it's not clear for me.
Could you write a piece of code clarify how to import cad and explode it or use it to create lines and text?
Thanks in advance
Hi,
each necessary step can be found either in the Revit SDK (as a sample VS project or in the RevitAPI.chm) or on Jeremy's TBC blog.
Create a new Family document using a proper Family template, e.g. Gereric_Model.rtf or so.
Import your DWG/DXF file using Document.Import(..., out ElementId).
The ElementId is your ImportInstance.
Analyze its geometry to get the Solid(s).
In Family context, you can create FreFormElements of solids.
That's the 3D stuff.
For 2D:
The geometry also will give you Lines and Arcs, which could be used to generate ModelCurves.
I don't think you can get text objects like AutoCAD's MText, but perhaps their geometric representation.
Using RevitLookup will help a lot.
That's all.
Forget the UIAutomation approach which was just a workaround for former releases.
Revitalizer