macro for sending objects to layers
macro for sending objects to layers
(OP)
Hi all,
How can I create a macro, to send model objets, solids, splines, points, datums etc. To selected layers with a macro or .dll.
For example,
Solids to layer_1, Points to layer_2, Splines to layer_3 etc.
I want a customized macro o a .DLL file. But I am not a programmer.
Some help.
Thanks.
How can I create a macro, to send model objets, solids, splines, points, datums etc. To selected layers with a macro or .dll.
For example,
Solids to layer_1, Points to layer_2, Splines to layer_3 etc.
I want a customized macro o a .DLL file. But I am not a programmer.
Some help.
Thanks.





RE: macro for sending objects to layers
For example if you want to move splines into a specific layer:
Format > Move to Layer > type > toggle only curves "On" > detail filtering (at bottom of window) > spline > ok > ok > "select all" > ok > pick the layer that those splines will go into
You don't need to be any sort of programmer to do a macro, but it may take a little practice . . . just remember that it will follow whatever keystrokes you do after you select "start macro" unp until "stop record"
RE: macro for sending objects to layers
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.com/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: macro for sending objects to layers
Yes I have open license on GRIP, .NET, API etc.
But I am quiet new user on NX programming.
I don't know yet, how to execute a GRIP program on NX. Usually I execute .VB macros and some . dll files.
Just simple program to change color to pieces, etc.
Just with some example I can try to customize it.
I am using NX 7.5.3
Thanks.
RE: macro for sending objects to layers
File -> Execute -> GRIP...
...and select the GRIP executable (.grx) file.
Try it out and see if this was what you were looking for.
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.com/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: macro for sending objects to layers
Your are right, I was looking for this.
I am going to pass this GRIP to VB.
I thik is more open .VB programing for loading on NX, with jounaling.
Thanks.
RE: macro for sending objects to layers
How can I pass this GRIP program to C++ or VB code?
Thanks.
RE: macro for sending objects to layers
John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.com/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: macro for sending objects to layers
Just for education purposes I have used three different methods for the object types. This should make it possible to extend it for any other types of displayable objects.
Frank Swinkels
RE: macro for sending objects to layers
This was I am looking for, one questions how can I customize this .VB, as John's GRIP that it takes a small window, for changing defined layers on the .VB.
I don't know with .VB how to take this small interface windows.
Thanks.
RE: macro for sending objects to layers
This dialog is only suitable for NX7.5. The dialog code means that to use it on say NX6 would throw an error.
Make sure the dlx file is in one of the following locations:
1.) From where NX session is launched
2.) $UGII_USER_DIR/application
3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly recommended. This variable is set to a full directory path to a file containing a list of root directories for all custom applications. e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_ROOT_DIR\menus\custom_dirs.dat
Frank Swinkels
RE: macro for sending objects to layers
I am confused on your UGii_use_dir/application suggestion where to put the DLX file. Could you please explain a little bit better on how to set this up?
Will this work running NX out of teamcenter?
We very new to NX and this will work great for us. Thanks.
RE: macro for sending objects to layers
1) Assume we have a directory structure.
C:\uguser\application
C:\uguser\startup
C:\uguser\udo
The application subdir contains all my dlx files (for Block Styler)
The startup subdir contains any tbr files (for toolbars) and any dll files which are loaded at startup (ie in the tbr files).
The udo subdir contains any udo dll files.
2)We now need to place an entry in an appropriate custom_dirs.dat file.
My custom_dirs.dat file (for NX6) is at:
C:\ugs\nx6\UGII\menus\
Edit the custom_dirs.dat file by adding a line which in my case is
C:/uguser/
Note do not use C:/uguser/application. NX would look for C:/uguser/application/application which of course does not exist.
3) Finally create an environment variable.
The variable name is UGII_CUSTOM_DIRECTORY_FILE
The variable value is C:\ugs\nx6\UGII\menus\custom_dirs.dat (based on the above example values)
Hope this helps.
Frank Swinkels