JamesWingfield
Automotive
- Apr 16, 2007
- 2
I'm looking into creating some (simple?) macros for UG using the macro recorder in NX3 and everything seems to be working OK but one thing I'm struggling with is reading attributes.
The macro I'm looking to create is one that creates a new part file and assigns a specific file name based on the part in which the user originally run the macro from.
(by now you've probably all guessed that this is to create a drawing file from a model file)
If the user starts in a model file '1234_m.prt' then I want the macro to automatically assign the new filename to be '1234_d.prt' and to create the file in the same directory.
How can I do this?
Currently I get as far as the new file dialogue box but it then requires the user to type in the desired filename.
Any help would be much appreciated as I'm new to this kind of programming...
Thanks,
James
The macro I'm looking to create is one that creates a new part file and assigns a specific file name based on the part in which the user originally run the macro from.
(by now you've probably all guessed that this is to create a drawing file from a model file)
If the user starts in a model file '1234_m.prt' then I want the macro to automatically assign the new filename to be '1234_d.prt' and to create the file in the same directory.
How can I do this?
Currently I get as far as the new file dialogue box but it then requires the user to type in the desired filename.
Any help would be much appreciated as I'm new to this kind of programming...
Thanks,
James