How to get topoTypeId in order to create Toposolid

How to get topoTypeId in order to create Toposolid

vaidas
Contributor Contributor
482 Views
4 Replies
Message 1 of 5

How to get topoTypeId in order to create Toposolid

vaidas
Contributor
Contributor

Hi How to get topoTypeId in order to create Toposolid using 

public static Toposolid Create(
	Document document,
	IList<CurveLoop> profiles,
	ElementId topoTypeId,
	ElementId levelId
)

what to pass to the third parameter topoTypeId

0 Likes
Accepted solutions (1)
483 Views
4 Replies
Replies (4)
Message 2 of 5

jeremy_tammik
Alumni
Alumni
Accepted solution

I would suggest retrieving all database ElementType objects with the category Toposolid and using one of those. That is the most common method to populate such a type id argument.

  

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

vaidas
Contributor
Contributor

but if i have empty doc? 

0 Likes
Message 4 of 5

jeremy_tammik
Alumni
Alumni

If your document lacks a Toposolid type, it may be impossible to create a new Toposolid. Try it out manually in the UI and see whether it works. However, I doubt that it is possible to remove all Toposolid types from a Revit 2024 RVT project. I would assume that they are built-in, hardwired.

  

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

vaidas
Contributor
Contributor

yes sorry, I misunderstood the first answer. You are totally right, thanks!

0 Likes