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:parameter within a geo 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

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.