Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all articles
Browse latest Browse all 783

Issues with moving an object to a layer

$
0
0

I am having a really hard time getting a body to move to layer 255. I create a new component within an assembly, and mirror a body within the new component. Then I attempt to move the original body to layer 255 and it will not work.

If my assembly is more than 2 levels deep, then I can make the component's parent my display part, and it appears correctly. While I do these operations, I have the highest component available in the assembly my display part. Does anyone have any ideas why this might happen?

I attempted to grab/clean up some of the code snippets I've tried to accomplish this, they are below.

Dim objs As DisplayableObject = CType(bod, DisplayableObject)
objs.Layer = 255
objs.RedisplayObject()
displayPart.Layers.ApplyMoveToLayerToOwningParts(255, arrBodies)
Dim objs() As NXObject
Dim lay As Integer
Dim prt As Part = CType(obj.OwningPart, Part)
Dim objs() As DisplayableObject = {CType(obj, DisplayableObject)}
prt.Layers.MoveDisplayableObjects(lay, objs)

Viewing all articles
Browse latest Browse all 783

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>