Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to get contour lines from toposolid

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
NZhouSNYLF
434 Views, 9 Replies

how to get contour lines from toposolid

toposolid had a very big issue (at least for us) -> no contour lines displayed when "Modify Sub Elements", try to find solution or workaround, is API doable?

NZhouSNYLF_0-1697557347624.png

NZhouSNYLF_1-1697557395168.png

 

 

9 REPLIES 9
Message 2 of 10
jeremy_tammik
in reply to: NZhouSNYLF

I would assume that the contour lines can be accessed via view-specific geometry. Enter a view displaying them and use RevitLookup or some other database exploration tool to retrieve the toposolid view-specific element geometry. See if you can find the lines in there somewhere. If so, you should be able to copy their curve geometry and generate model curves from that.

   

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 3 of 10
NZhouSNYLF
in reply to: jeremy_tammik

thanks Jeremy, i tried RevitLookup to search contour lines for both (new) Toposolid and (old) Topography but in vain, maybe i missed something simple?
Message 4 of 10
jeremy_tammik
in reply to: NZhouSNYLF

IncludeNonVisibleObjects?

  

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 5 of 10
NZhouSNYLF
in reply to: NZhouSNYLF

so i can only access those contour lines via geometry instead of native Revit stuff? i'll give it a try, thanks Jeremy

 

edit: RevitLookup can find contour lines via GeometryElement

Message 6 of 10
NZhouSNYLF
in reply to: NZhouSNYLF

hi Jeremy, i did a quick test, seems curtain wall works OK but toposolid doesn't, strangely RevitLookup looks OK but coding only list ONE solid

Message 7 of 10
jeremy_tammik
in reply to: NZhouSNYLF

RevitLookup IS coding, exactly the same as yours, unless you missed something. Compare more carefully, spot the difference, and you will see how to achieve the same.

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 8 of 10
NZhouSNYLF
in reply to: NZhouSNYLF

thanks Jeremy, i did test for both Toposolid and TopographySurface

. RevitLookup can display contour lines info so it's doable as you mentioned early

. same coding approach works for TopographySurface but not for Toposolid

 

edit: need to add options.View = doc.ActiveView;

Message 9 of 10
jeremy_tammik
in reply to: NZhouSNYLF

Great! Congratulations on solving it and thank you for the confirmation. Can you add a little bit more detail on your exact solution, maybe adding a small code snippet demonstrating the crucial points? Thank you!

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 10 of 10
NZhouSNYLF
in reply to: NZhouSNYLF

thanks Jeremy, works OK now after adding "options.View = doc.ActiveView;"

NZhouSNYLF_0-1697830979409.png

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community