how to extract the geometry and the texts of the title block in a sheetview?

how to extract the geometry and the texts of the title block in a sheetview?

pmeigneux
Advocate Advocate
6,566 Views
24 Replies
Message 1 of 25

how to extract the geometry and the texts of the title block in a sheetview?

pmeigneux
Advocate
Advocate

I want to extract all that is visible and correctly placed in the attached image.

 

0 Likes
Accepted solutions (1)
6,567 Views
24 Replies
Replies (24)
Message 21 of 25

jeremytammik
Autodesk
Autodesk

Application > Documents > select the family definition document.



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

0 Likes
Message 22 of 25

pmeigneux
Advocate
Advocate

My code :

Ok, i found some TextNode, TextElement and ImageInstance. But my filters are not working.

Is there any documentation of filter ?

 

My code :

FilteredElementCollector collector = new FilteredElementCollector(DocFamily);
ICollection<Element> lines = collector.OfCategory(BuiltInCategory.OST_Lines).ToElements();
ICollection<Element> texts = collector.OfClass(typeof(TextNote)).ToElements();

Where is not error ?

0 Likes
Message 23 of 25

jeremytammik
Autodesk
Autodesk

Dear Pierre, 

 

You really do need to learn to search the Internet.

 

In this case, for instance, you can just search for 'Revit API filtered element collector':

 

https://duckduckgo.com/?q=revit+api+filtered+element+collector

 

Please practice this for a bit before asking the next question.

 

Best regards,

 

Jeremy

  

 



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

0 Likes
Message 24 of 25

jeremytammik
Autodesk
Autodesk
Accepted solution

The specific problem that you ran into was discussed in the note on reinitialising the filtered element collector:

  

https://thebuildingcoder.typepad.com/blog/2019/11/design-automation-api-stacks-collectors-and-links....

  



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

0 Likes
Message 25 of 25

jeremy_tammik
Alumni
Alumni

I edited this conversation and preserved it for posterity on The Building Coder:

 

https://thebuildingcoder.typepad.com/blog/2021/01/sheet-view-xform-coords-img-export-and-title-block...

 

Thank you very much for your contributions!

  

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