Robot Structural Analysis Forum
Welcome to Autodesk’s Robot Structural Analysis Forums. Share your knowledge, ask questions, and explore popular Robot Structural Analysis topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ROBOT / VBA / API - Structure rotation

7 REPLIES 7
Reply
Message 1 of 8
ve_75
617 Views, 7 Replies

ROBOT / VBA / API - Structure rotation

Hi,

 

I'm looking for making an entire rotation of my structure.

I think I have to define the point of rotation, the axis of rotation, and the angle of the rotation.

 

After looking in the guide, I found this, but it doesn't work for the moment:

 

Sub Entire_Structure_Rotation

 

     Dim Robot as New Application

 

     '1st step: Entire Structure Selection
     robot.Project.structure.Objects.GetAll 'or something like that

 

     '2nd step: Transformation: Rotation

     Dim structure_rotation As RobotObjOperRotation

 

     structure_rotation.AxsP1 = ??                             'don't know what to write
     structure_rotation.AxsP2 = ??                             'don't know what to write
     structure_rotation.Type = I_OOT_ROTATE      'I think it's this command

 

    End sub

 

Is it possible to have an example for a rotation of 45 degrees from the point (0,0,0) and around the Z axis?

 

Thanks for answering,

 

VE

 

7 REPLIES 7
Message 2 of 8
Rafal.Gaweda
in reply to: ve_75

From documentation:

 

SelRotate ( see page 990) Function performs the operation of rotation on the current selection. .

 

Use :

 

Robot.Project.Structure.Edit.SelRotate.........



Rafal Gaweda
Message 3 of 8
ve_75
in reply to: Rafal.Gaweda

Hi,

 

Thank you for your answer, i didn't see this command.

 

I'm trying to make a global selection (all cases, all structure, all nodes, ..., everything)

I managed to select the whole structure (nodes and panels) but not for all cases.

 

 

Is it possible to add some elements to the following code please and select all cases of the model please?

 

     Sub entire_structure_rotation()


     Dim robot As New RobotApplication
     Set robot = New RobotApplication

     '1st step: Entire Structure Selection
     robot.Project.structure.Selections.Get(I_OT_OBJECT).FromText ("1A1000")      'Seems OK

     robot.Project.structure.Selections.Get(I_OT_CASE).FromText ("1A1000")           'Seems not to work

      robot.Project.structure.Selections.Get(I_OT_NODE).FromText ("1A100000")     'Seems OK

 


     '2nd step: Entire Structure Rotation
     Dim transformation As IRobotStructureEditTools
     Set transformation = robot.Project.structure.Edit
     transformation.SelRotate 0, 0, 0, 0, 0, 1, 50, I_TO_MOVE, 1                                       'Seems OK

 

     End sub

 

 

 

Thank you,

 

VE

Message 4 of 8
Rafal.Gaweda
in reply to: ve_75

 

Is it possible to add some elements to the following code please and select all cases of the model please?

 

What for?

Loads are copied  \ moved with objects which they are assigned to.



Rafal Gaweda
Message 5 of 8
ve_75
in reply to: Rafal.Gaweda

Hi,

 

In fact the code I gave you doesn't select cases... I don't understand why....

Do you have an idea?

 

 

VE

Message 6 of 8
Rafal.Gaweda
in reply to: ve_75

selcount.jpg



Rafal Gaweda
Message 7 of 8
ve_75
in reply to: Rafal.Gaweda

Hi,

 

In fact the problem comes from the specific type of loading case.

The rotation works with uniform loadings while it doesn't work with loadings defined by a "contour".

 

Do you have a solution to move all type of loadings at the time?

 

You can do the test with the enclosed file and the following code:

 

     Sub entire_structure_rotation()


     Dim robot As New RobotApplication
     Set robot = New RobotApplication

     '1st step: Entire Structure Selection
      robot.Project.structure.Selections.Get(I_OT_OBJECT).FromText ("1A100000")
     robot.Project.structure.Selections.Get(I_OT_NODE).FromText ("1A100000")
     robot.Project.structure.Selections.Get(I_OT_CASE).FromText ("1A1000")

 

     robot.Project.ViewMngr.Refresh

     '2nd step: Entire Structure Rotation
     Dim transformation As IRobotStructureEditTools
     Set transformation = robot.Project.structure.Edit
     transformation.SelRotate 0, 0, 0, 0, 0, 1, -50, I_TO_MOVE, 1


     End Sub

 

Message 8 of 8
Rafal.Gaweda
in reply to: ve_75


@ve_75 wrote:

Hi,

 

In fact the problem comes from the specific type of loading case.

 

Load type, not case.

 

The rotation works with uniform loadings while it doesn't work with loadings defined by a "contour".

 

 

 

It does not work in Robot either.

Any contour load can not be copied moved rotated.

 



Rafal Gaweda

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report