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

Move datums, axes, sketches, extrudes of component on another assembly layer

$
0
0

You can delete this topic, if you want, because I already solved the problem =)

The working part (Assembly) contains components that are not subassemblies. Components contains the features build tree, including datums, axes, sketches, extrudes. Need to move components with specific attributes and their objects (datums, axes, sketches, extrudes)on layer 10 of the assembly.
I used this code http://www.nxjournaling.com/content/creating-subroutine-process-all-comp... and was able to sort the components I need and move them on a assembly layer, but don't know how to move the contents of the components.

if child.GetStringAttribute("DB_PART_TYPE")="type1" Then
ufs.obj.SetLayer(child.tag, 10)
end if

Code transfers the contents of the component if they belong to the same layer with the component. But if I manually transfer the contents(datums, axes, sketches, extrudes) (by using the selection filter) to another layer of the assembly, the code move only component but not of its contents.


Viewing all articles
Browse latest Browse all 783

Trending Articles



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