How to extract infomation from importance of dwg linked into revit by API?

How to extract infomation from importance of dwg linked into revit by API?

27925916
Advocate Advocate
964 Views
5 Replies
Message 1 of 6

How to extract infomation from importance of dwg linked into revit by API?

27925916
Advocate
Advocate

after linking dwg into revit, I want to create a button which could have the same function like query function in revit below:

query.png

and I also want to allow users to pick different layers which stand for different elements like layers of beams or layers of walls, when user click my button.

 

But I have read lots of documents, there are two ways I found:one is exploding the importance, the other is analyzing its geometry, extract the solids and create FreeFormElements of them. but I compare the two ways and revit's  query function, I found the query function does'nt need to create modelline ,and could allow user to pick everything in importance like line or text, I am really confused whether there is any way to realize my function:when user click the designed button,they could choose to pick any layers or pick lines or text.

0 Likes
965 Views
5 Replies
Replies (5)
Message 2 of 6

jeremytammik
Autodesk
Autodesk

The best and easiest way to explore the internals of a DWG file is to use the AutoCAD.NET API or RealDWG:

 

 

Both of these can be used from within a Revit add-in.

 

The Revit API does not offer much to achieve what you are after.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 6

27925916
Advocate
Advocate

is it nessary to get text infomation  to explode after dwg linked into revit?

I have used pickobject to get lines in importance, but I can't find way to get these layers which is described by text and get these text:

note111.png

0 Likes
Message 4 of 6

27925916
Advocate
Advocate

I have a question, if 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?

0 Likes
Message 5 of 6

NGM_AiYo
Advocate
Advocate

have you found the way to solve this problem? @27925916 

0 Likes
Message 6 of 6

jeremy_tammik
Alumni
Alumni

I see quite a number of other threads dealing with this topic here in the forum searching for "dwg text"... have you taken a look at those?

  

https://forums.autodesk.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=false&...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes