How to Create a Parametric Set inside a Geometrical Set
|Other than automating the copy and paste process, I think the code below should create a new set of parameters under a newly created geo set, then you should be able to add parameters to that parameter set:
Sub CATMAIN() Set oDoc = CATIA.ActiveDocument Set oPart = oDoc.Part Set oParams = oPart.Parameters Dim HB as hybridbodies set HB = oPart.hybridbodies Dim HB1 as hybridbody set HB1 = hb.add() Set oRootParams = oParams.RootParameterSet Set oMainBody = oPart.MainBody oParams.CreateSetOfParameters (HB1) oPart.Update End Sub
2 Comments
I was curious if this could be done with automation, so I was excited to see this blog post. However when I run the above code in vba, I get run time error ‘438’: Object doesn’t support this property or method. Do you have a suggestion about getting around this type or error?
Thanks, with this method is so easy to add a parameter set under a geometrical set.
But now, how the change his name ??
Thanks in adavance