Programati?cally select drawing items by layer and move them.
Programati?cally select drawing items by layer and move them.
(OP)
Is it possible to programatically select all items on a certain drawing layer (256 for example) and move them to a different location on a drawing? If so, could you please provide a code snippet showing that?
I am using NX 8.5 and VB.Net
Thanks
I am using NX 8.5 and VB.Net
Thanks





RE: Programati?cally select drawing items by layer and move them.
Without a program and using your example, make sure layer 256 is visible and selectable. Format -> Move to Layer. On the Class Select dialog box that appears, make sure you have all options expanded and in the lower third of the dialog you'll see your filter options - pick the Layer filter, select layer 256, then OK (this sets up the selection to only pick objects on layer 256), then up at the top of the Class Selection dialog, pick Select All. This will bring up another dialog from which you pick the destination layer - make your pick and OK/Apply. Done.
You also can preselect objects then invoke the commands, if you prefer that route. The NX Help docs should assist in helping you understand that a little better. Note that you can filter by object types, colors, layers, attributes and select/deselect all from the Class Selection or Preselection filters.
Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
RE: Programati?cally select drawing items by layer and move them.
Regards,
Scott
RE: Programati?cally select drawing items by layer and move them.
You explained it just fine and what I posted above will achieve exactly what you wish to do - the layer filters disallow any selection of objects which reside on any other layers except the ones you select to apply as the filter.
Watch the movie I've attached (zipped) - mixed geometry types, all reside on layer 1 except for the 6 points which are on layer 256. I invoke the Move To Layer command, set my layer filter to 256 and move the points to layer 10. Pretty much what you're asking, correct? I'm using NX9 but the Move To Layer command has been around for ages, won't be any different for you.
layer_move.zip
Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB