Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

animate object

Master
Master

Hi,

 

I have a  3d model with base and lid. the base should move up and down based on the sent. Eg: if sensor position is 0 it should move down , if sensor position is 1 it should move up. 

How to write the program?

15 REPLIES 15

Re: animate object

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Sahana,

 

attached you can find an example model where a similar animation is implemented. In your model you can use a method that is called whenever your sensor is activated similar to the following code

 

var animations : any := Your_new_3D_Object._3D.getObject("Name of the animatable part of your object here").SelfAnimations --here you need to set what object is supposed to be addressed and what the name is of the animatable part of that object
animations.resetAnimation
animations.YourAnimation.schedule --address the name of the animation that should be executed e.g. move down/up
animations.playAnimation

So whenever your sensor is activated or deactivated, you will have the animation of your object active accordingly.

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution


Re: animate object

Master
Master

Please find the attached Image. I would like to move the top part of the object (seen in the image) Up and Down. This has to be done in Tecnomatix without any sensor values. As of now, I tried using the help document, but all in vain. Could you please help me with the in-detail process of how to execute this?

There is no requirement for an entity to come in contact with the curing machine. The movement of the part has to take place just on the basis of the program/method written. Kindly help me with the same. 

Thank you

Re: animate object

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Sahana,

 

to animate your object you first need to open its class in a new 3D window. Now you need to choose the part which you would like to be moving in your animation. In your example this will be the upper part of your object I suppose. So you right click that part and click on "Edit 3D Properties". Here you navigate to the tab "Self Animation". There you will need to add your desired animations and name them accordingly. You can see an example implementation of this in the attached picture and model, here are three animations defined. You can define a new animation by clicking on "Add" in the "Self Animation" tab. In the following dialog you declare the name of the new animation, leaving the other option unchanged. Now you need to select your newly defined animation and click on "Edit". In the window that opens you can define points that your object will navigate towards in the order in which you create these points. You can add new points by clicking on "Add". By double clicking on a point you can alter its position by changing its x, y or z coordinate. When opening the first point you can check the box for "velocity" in the ensuing dialog. Now you can define the velocity with which your animated part will move or the time it will need for the whole animation. Defining either one of both attributes will automatically define the other. After you are done defining your animations, you can set your object into the frame and use the following method to run an animation

 

 

var animations : any := Press._3D.getObject("top").SelfAnimationsEventController.start --start simulation
animations.resetAnimation
animations.downup.schedule
animations.playAnimation

It is important to note here that you can only execute this method and have the animations of your object run, while there is simulation time passing. This normally happens when you have e.g. MUs coming into your model and being processed. So in case that you want to animate your object without it interacting with the model you still will have to include processes running in the background. You can see this in the attached example model. Here the source and drain are only inserted into the model to have events making the simulation time pass. After making sure that there are other objects that can make simulation time pass by in the frame you can start the animation by running a method similar to the one above or those in the attached example.

Kind regards,

Igor
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution


Re: animate object

Master
Master

I was able to do it. Thanks a lot @IgorKunjavskij Smiley Happy

 

 

Re: animate object

Master
Master

@IgorKunjavskij  @PeterKomarek @AlexD_SimPlan could anyone help me out with the following.?

I have attached one image.

In this I want the center black drum to rotate (2 rounds) in its still position. How to do it?

Re: animate object

Siemens Phenom Siemens Phenom
Siemens Phenom

Under the assumption that the black drum is an animatable object (if it is a simple graphic, convert it to an animatable object with "Create animatable object"), you can call e.g.

 

MyObject.getObject("MyAnimatableObject")._3D.SelfAnimations.playRotation(0, 720, 360)

 

to rotate the animatable object MyAnimatableObject of the simulation object MyObject from 0° to 720° (which equals two full circles) with an angle velocity of 360°/s.

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution

Re: animate object

Master
Master

@PeterKomarek Thank you so much.

Re: animate object

Master
Master

Is there any object called 'slider' ?  in Tecnomatix..? or anything similar to it.?

 

Re: animate object

Phenom
Phenom

I don't know of any object named "slider"

 

The closest object name, I know of, is "crossSlidingCar".

 

What's "slider" supposed to do ?