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
From documentation:
SelRotate ( see page 990) Function performs the operation of rotation on the current selection. .
Use :
Robot.Project.Structure.Edit.SelRotate.........
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
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.
Hi,
In fact the code I gave you doesn't select cases... I don't understand why....
Do you have an idea?
VE
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
@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.