Message 1 of 2
add family parameter (forgetypeid is still a puzzle to me)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've read a few posts here regarding conversion etc. but no clear answer to me was found.
So: how do I add a simple parameter to a family?
Using python, but you get the picture if you're using C#.
settempparam = doc3.FamilyManager.AddParameter("parametername_as_string", ForgeTypeId, ForgeTypeId, False)
So for example I want to add a text parameter in IdentityData:
settempparam = doc3.FamilyManager.AddParameter("parametername_as_string", DB.GroupTypeId.IdentityData, DB.ForgeTypeId(DB.SpecTypeId.Number), False)
(above doesn't work)
So to my understanding:
- DB.GroupTypeId is the replacement for BuiltinParameterGroup
- Now so magic is happening ... where or how do I know what ForgeTypeId does / how I construct one etc? Don't tell me read at revitapidocs, did that, don't understand it (yet).
Ok, this one does work. But how am I supposed to know this is the way to go?
https://www.revitapidocs.com/2023/87de2c69-a5e8-40e3-3d7a-9b18f1fda03a.htm doesn't show "String" as property ... I'm confused how to get full documentation on this one.
settempparam = doc3.FamilyManager.AddParameter("parametername_as_string", DB.GroupTypeId.IdentityData, DB.SpecTypeId.String.Text, False)
love python coding