×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Catia V5 change parameter values by a programmed VB Script

Catia V5 change parameter values by a programmed VB Script

Catia V5 change parameter values by a programmed VB Script

(OP)
Dear All,

Currently I am using CATIA V5 R20 in which I would like to draw a scalable aircraft. I want to do that by linking the dimensions in sketches, pads, pockets, etc; to parameters which can be changed easily from the model tree.
The project group in which I am participating is writing a computer program which scales an Airbus A320, such that the scaled aircraft is able to meet a set of requirements different than the original A320 requirements. This computer program is written in Matlab.

Now my task is to automate the CATIA parts of the aircraft. Such that the values of the parameters in the CATIA parts are synchronized with the parameter values that are calculated by the MATLAB program.

I have studied the "VB Scripting for CATIA V5" book written by Emmett Ross. Furthermore I have looked into the CATIA automation documentation. In particular to the "Part Document Automation Objects" and the "Parameters Automation Objects". I did find how to create a new .CATPart file with a parameter in it, where I can specify the name and value of the parameter.
The code (written in MS VBA language) for that is below:
Sub CATMain()

Dim CATDocs As Documents
Set CATDocs = CATIA.Documents
Dim part1 As Document
Set part1 = CATDocs.Add("CATPart")
Dim rate As RealParam
Set rate = part1.Part.Parameters.CreateReal("Parameter1", 2.5)

End Sub



However I did not find how to change the value of an existing parameter yet. Which I do need for creating scalable CATParts.
Does anyone of you how to change the value of an existing parameter ?

By the way, you can only see the parameter when you have "Parameters" visible in the model tree. This can be done by:
Tools -> Options -> Infrastructure -> Part infrastructure -> Display in specification tree.

Thanks for your attention !
Best Regards,
Michael279

RE: Catia V5 change parameter values by a programmed VB Script

Hi,

Well, difficult to achieve what you want for a whole aircraft (hope this is a toy with less parts).

Attached you have some examples done by me along the time, I'm sure you can find them also on different forums.....

Regards
Fernando

https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources