how to create beams by lines from dwg linked into revit

how to create beams by lines from dwg linked into revit

27925916
Advocate Advocate
6,606 Views
26 Replies
Message 1 of 27

how to create beams by lines from dwg linked into revit

27925916
Advocate
Advocate

I link the dwg by the tool of revit  below:

 

test2.png

and we can see it  below, and I wanna know how to use the API to create beams by the lines standing for beam in dwg?

what should I do ?  should I use the API to select lines representing beams first ? and what to do next ..

test1.png

test3.png

0 Likes
Accepted solutions (1)
6,607 Views
26 Replies
Replies (26)
Message 21 of 27

matthew_taylor
Advisor
Advisor

Hi @27925916,

Riiiiight. You can get everything but text.

There are 3 methods of doing this that come to mind.

  1. As Jeremy suggested in your other post, use AutoCAD (via Revit) to get the information you need.
  2. Do pre-processing in AutoCAD (either from Revit or independently). (Just put the beam lines on a layer called 'BeamType1', 'BeamType2' etc. This negates the need to find the text in Revit.)
  3. Explode non-linked importInstances, get the information you need, undo that command.

3 is the easiest to do manually, but there's no access to the 'explode' part via the API.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 22 of 27

27925916
Advocate
Advocate

if I choose first way ,when I pick a note containning text in revit , then how I get its information  by exploring the internals of a DWG?  the GraphicsStyleId in revit can have relationship with the internals of a DWG? 

And I should use the dll of ObjectARX?

0 Likes
Message 23 of 27

matthew_taylor
Advisor
Advisor
Accepted solution

You would need to get all relevant information from the DWG by actually opening the DWG in AutoCAD (or by using RealDWG). There is a separate forum for AutoCAD API or ObjectARX.

You would also need to perform a transformation of the DWG point data as you bring it into Revit if the ImportInstance has been moved/rotated from origin.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 24 of 27

27925916
Advocate
Advocate

is there any link to a free trial of RealDwg? I am just a student.. Smiley Embarassed

0 Likes
Message 25 of 27

matthew_taylor
Advisor
Advisor

Point 7 seems to cover that:

http://techsoft3d.com/developers/technical-documentation/autodesk-realdwg/

See the link also to AutoCAD free 30-day trial.

 

 


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
0 Likes
Message 26 of 27

27925916
Advocate
Advocate

a good people advises me a way that we can make  add-inexport to a DXF file and then read the text from that, is it ok?

0 Likes
Message 27 of 27

matthew_taylor
Advisor
Advisor

That would work.

There's probably examples of parsing DXF files out there. Can't imagine it's much fun though. Smiley Wink


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?