Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

User parameter sublist

Status
Not open for further replies.

Arpad_Jacso

Computer
Aug 22, 2019
14
Hi,

Is there any way to set a user or renamed parameter sublist?
 
Replies continue below

Recommended for you

in script? the parameters do have a property: .Renamed =True/False

regards,
LWolf
 
It doesn't work:

Set part1 = CATIA.ActiveDocument.Part
Set parameters4 = part1.Parameters.Renamed = False

"Object doesn't support this property or method"
 
what is it you are trying to achieve?
your syntax is wrong. you can check if the parameter is renamed and then do something based on that assertion:
if part1.Parameters.RootParameterSet.DirectParameters.item(1).Renamed then
Do something​
else
Do something else​
end if​

regards,
LWolf
 
I have a part with tons of parameter, and I would like to add some via macro.
The goal to add the 'userparm.1' parameter and a round formula. To load the whole parameterset is very long, and I would like to set a user sublist (or renamed sublist) to decrease this load time.

Set part1 = CATIA.ActiveDocument.Part

Set parameters4 = part1.Parameters '-------------> this should be a renamed sublist

Set realParam4 = parameters4.CreateReal("userparm.1", 0#)
Set relations4 = part1.Relations
Set formula4 = relations4.CreateFormula("Formula.250", "", realParam4, "round(10*userparm.2)/10")
 
No, I don't need new subset, I need a sublist for my user parameters

I don't know what to write instead of 'renamed parameters', or I don't know if exists anything like that.

Set part1 = CATIA.ActiveDocument.Part

Set parameters4 = part1.Parameters.SubList('renamed parameters', False)
Set realParam4 = parameters4.CreateReal("userparm.1", 0#)
Set relations4 = part1.Relations
Set formula4 = relations4.CreateFormula("Formula.250", "", realParam4, "round(10*userparm.2)/10")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor