How to modify x coordinate of a block feature

Hello, i created a block feature and I want to print/ modify X Coordinate of the block. I tried the function PositionMatrix and NodePositionMatrix to get access to X but both gave me wrong x coordinate. do you know how to get access and modify X coordinate of this feature by python script?

Feature trees are shared between simulation nodes (vcNode) so the world position of a feature is always some specific node’s position (WorldPositionMatrix) + the feature’s position relative to the root of the feature tree (NodePositionMatrix)

1 Like

so is there a way to access that -1189.8 by script?

and if I try WorldPositionMatrix, it gives me error “Attribute or method ‘WorldPositionMatrix’ not found”

Hello, Kwin,

A geometric primitive feature does not have a WorldPositionMatrix attribute; it should only have a PositionMatrix attribute. The PositionMatrix attribute points to its parent coordinate values. If needed, you can calculate its WorldPositionMatrix. Of course, you can only modify the PositionMatrix attribute because the WorldPositionMatrix attribute is read-only. You can try to look up related knowledge about vcMatrix.

1 Like

If this is something that you want to move during the simulation I recommend separating the feature to itäs own node so it can be moved easily by a join.

Otherwise, you can select the parent feature (BackCut3), and add a translation transformation { Tx(500) } to translate the feature along X axis. Instead of using a fixed amount like 500, you can also use a variable.