Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create and Rename a ParameterSet

Status
Not open for further replies.

Vicker85

Mechanical
Jan 27, 2014
31
US
Hello!

I am fairly new to automating CATIA via VBA.

I am able to create a new ParameterSet but i am unable to rename it using VBA.

For eg. the following code creates a Parameter Set with its name as per index of that ParameterSet:

Sub CATMain()
Set oDoc = CATIA.ActiveDocument
Set oPart = oDoc.Part
Set oParams = oPart.Parameters
Set oRootParams = oParams.RootParameterSet

oParams.CreateSetOfParameters (oRootParams)

Set myParamset = oRootParams.ParameterSets.Item(oRootParams.ParameterSets.Count)

Set myParams = myParamset.DirectParameters
Set myReal = myParams.CreateReal("Height1", 10)
Set myReal = myParams.CreateReal("Height2", 100)

oPart.Update
End Sub

Can someone please explain how do we rename a ParameterSet in VBA.
Thanks in advance!
 
Replies continue below

Recommended for you

I couldn't find a "name" property or "rename" method for the object type "ParameterSet"

10-7-2016_2-31-38_PM_ksvlqi.jpg


Drew Mumaw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top