×
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

How to animate a parameter in Catia

How to animate a parameter in Catia

How to animate a parameter in Catia

(OP)
I am trying to create an animation of an object that shows the variation of a single parameter -- in this case a radius length value. I would like to create a 10-second animation, using a fixed camera position in Photo Studio, that animates this parameter. I have attached a series of screen shots showing the range of the middle radius parameter -- from .5in to 3.0in -- for reference.


Any advice on how to animate this parameter would be greatly appreciated. Advance thanks.

RE: How to animate a parameter in Catia

CODE --> VBSCRIPT

Language="VBSCRIPT"

Sub CATMain()

Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set parameters1 = part1.Parameters
Set selection1 = CATIA.ActiveDocument.selection
Set objViewer3D = CATIA.ActiveWindow.ActiveViewer
Set objCamera3D = CATIA.ActiveDocument.Cameras.Item(1) 
objViewer3D.FullScreen = True 
exten = ".png"
fileloc = "D:\"
imagename="animation"
objViewer3D.Viewpoint3D = objCamera3D.Viewpoint3D

if selection1.count=1 then
Set length1 = parameters1.Item(selection1.item(1).value.name)
storedValue=length1.Value

initial= InputBox("Input initial value of parameter")
final= InputBox("Input final value of parameter")
noOfSteps= InputBox("Input number of steps")
step=(final-initial)/(noOfSteps-1)

for i=1 to noOfSteps
length1.Value=initial+(i-1)*step
part1.Update 
strname = fileloc & imagename & Cstr(i) & exten
'msgbox strname
objviewer3D.Capturetofile 4,strname
next

objViewer3D.FullScreen = False
length1.Value=storedValue
part1.Update 
else 
msgbox "Select only 1 parameter!"
End If

End Sub 

Anyway, I wrote small macro to animate parameter and create set of images with /png extension. You can merge those files manually with almost minor of graphic programs, e.g. gimp.
Location: D:\ (You can change it manually)

Hide all unnecessary elements (sketches, etc), select parameter to animate and run macro

LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013

RE: How to animate a parameter in Catia

(OP)
Thanks for the link and the macro LukaszSz!

I wasn't able to get the spring example to work yesterday but it seems like it is not far off. One of my goals is to render from the animation tab within the Photo Studio shooting definition so that I can use the indirect illumination settings.

I will give your macro a try now. Cheers!

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