- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
It looks a little over my head but I think I get it. I generally run these as not visual basic and this is running in an assembly. It looks like the rule shown was meant for a part document so I changed a little bit.
I ran it originally as straight vb and it didn't actually create anything that I could see so I tried modifying it a bit. This was a little test I ran to see if I could adapt it to accept pre existing Parameters, which sadly didn't work. Gave me the error "Object of type 'System.UInt32' cannot be converted to type 'Inventor.CommandTypesEnum'."
I've seen it before but that error seems to show up for a multitude of reasons. I did check the help area and while it mentions that you can create special parameter folders it doesn't say how oddly enough.
Thank you again
Sub Main()
Dim oAsmDoc as AssemblyDocument = ThisDoc.Document
Dim oAsmCompDef As ComponentDefinition
oAsmCompDef = oAsmDoc.ComponentDefinition
Dim oCustomParamGroup As CustomParameterGroup
oCustomParamGroup = oAsmCompDef.Parameters.CustomParameterGroups.Add("Custom Group", "Rafters")
oCustomParamGroup.Add("Rafters")
End Sub