Continue to Site

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!

reusing created catia parameter in vba

Status
Not open for further replies.

akilic

Automotive
Jun 4, 2010
4
i am trying to create a visul basic code with using parameters.
after i execute the macro i can see theese created parameters under the parameters tree. also i am using these parameters for sweep operation but the sweep operation is taking only the parameter value itself. it is no more related with the parameter. how can i keep the relation between the parameter and the sweep value?

thanks
akilic
 
Replies continue below

Recommended for you


I found how to relate feature with the predefined parameter

Set formula1 = relations1.CreateFormula("", "", hybridShapeLineAngle2.Angle, "`Prism[1-1]\Prism[1-1]_i3`")
hybridShapeLineAngle2.Angle is my angle value used in the feature and

`Prism[1-1]\Prism[1-1]_i3` is my predefined parameter.

thanks
akilic
 
Hi
I am after fetching parameters under part properties. Please find the code below, which will fetch all parameters in the part. (in my case there are more than 10000, which slows down the process). I want to get all parameters under "Part1\Properties\Para.1, Para.2, Para.3....etc. Any idea?

Dim partDoc As Document
Dim paras As Parameters

Set partDoc = CATIA.ActiveDocument
Set paras = partDoc.Product.Parameters
For i = 1 To paras.Count
MsgBox paras.Item(i).Name
Next i
Please find attached screen shot.
 
 http://files.engineering.com/getfile.aspx?folder=ba540470-fe77-4445-91ec-bda0f96ae73e&file=Parameters.bmp
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top