Imported Cad Exploding

Imported Cad Exploding

mm1452
Enthusiast Enthusiast
770 Views
3 Replies
Message 1 of 4

Imported Cad Exploding

mm1452
Enthusiast
Enthusiast

Hi,

 

I want to explode an imported cad using Revit Api. how can I do this?

 

 

0 Likes
771 Views
3 Replies
Replies (3)
Message 2 of 4

Revitalizer
Advisor
Advisor

Hi,

 

I've already contributed an answer:

http://forums.autodesk.com/t5/revit-api/explode-sat-dwg-after-import/m-p/5501232/highlight/true#M863...

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





Message 3 of 4

mm1452
Enthusiast
Enthusiast

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

0 Likes
Message 4 of 4

Revitalizer
Advisor
Advisor

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




Rudolf Honke
Software Developer
Mensch und Maschine