You could use NXOpen.UF.Modl.TransformEntities
Thank you for the response, but I'm not sure this will do what I want with the data that I have. I will test it out and check if it is good enough. It looks like there are significant differences between what is done by uf5947 and NXOpen.UF.Modl.TransformEntities aka UF_MODL_transform_entities:
If it helps, the objects I'm trying to transform (actually move) are coordinate systems.
Attempting to do a "Move Object" manually on a coordinate system while recording a journal taught me a few things:
moveObjectBuilder1 = workPart.BaseFeatures.CreateMoveObjectBuilder(NXOpen.Features.MoveObject.Null)
So I undid that feature while still recording the journal, and just went in to "Edit with Rollback" to see what it was using to move the existing CSYS around. It is using an Xform to create a new CSYS to assign to the existing Datum CSYS. Here are some lines extracted from that part of the journal:
datumCsysBuilder2 = workPart.Features.CreateDatumCsysBuilder(datumCsys2) ... expression5.RightHandSide = "2" ... scalar15 = workPart.Scalars.CreateScalarExpression(expression5, NXOpen.Scalar.DimensionalityType.Length, NXOpen.SmartObject.UpdateOption.WithinModeling) ... offset3 = workPart.Offsets.CreateOffsetRectangular(scalar13, scalar14, scalar15, NXOpen.SmartObject.UpdateOption.WithinModeling) ... xform4 = workPart.Xforms.CreateXform(cartesianCoordinateSystem2, NXOpen.Offset.Null, offset3, scalar16, scalar17, scalar18, 1, NXOpen.SmartObject.UpdateOption.WithinModeling, 1.0) ... cartesianCoordinateSystem5 = workPart.CoordinateSystems.CreateCoordinateSystem(xform4, NXOpen.SmartObject.UpdateOption.WithinModeling) ... datumCsysBuilder2.Csys = cartesianCoordinateSystem5 ... nXObject3 = datumCsysBuilder2.Commit() datumCsysBuilder2.Destroy()
I might be able to use this round-about method and some of this syntax to get what I need for this script? I'd still love to know if anyone has an answer for my original question.
I suspect you will get the same result (parent will move) with transform objects too if you are trying to move a datum csys which is based on another csys. Try transform objects interactively.