IRPython scripting - Coordinate system creation - EXCEL
Dear all,
I would like to create a coordinate system in workbench by use of a Excel table.
(Xorig, Yorig, Zorig)+(CS Name) + (X axe Vector, Y X axe Vector, Z X axe Vector)
Origin+Name+Directional Vectors
I have identified the command/method in order to specify the coordinate system origine with
**testCS.OriginX = Quantity(tempX,"mm") testCS.OriginY = Quantity(tempY,"mm") testCS.OriginZ = Quantity(tempZ,"mm") testCS.name = "my coord" **
But i wonder how can i specificy the Directional vectors for coordinate system orientation ?
Many methods are proposed by the editor but there are undocumented :-(
I have no idea of the appropriated syntax.
Can somebody has answer about this ?
Thank you,
best regards all,
Answers
-
Not sure that we can define the Directional Vectors as they are read-only, even in the Mechanical interface (they are greyed out). However you can set the primary axis direction, as follows:
coordinate_systems_1 = Model.CoordinateSystems csys = coordinate_systems_1.AddCoordinateSystem() # set primary X axis to arbitrary (1,2,3) direction csys.PrimaryAxisDirection = Vector3D(1,2,3) # place csys origin csys.SetOriginLocation(Quantity(0,"in"), Quantity(0,"in"), Quantity(0,"in"))
1 -
Thank you for your answer, it is clear.
One direction is enough for me as i could align my CS to strain gauges alignment.
Best regards1