Reading attributes into a macro?
Reading attributes into a macro?
(OP)
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





RE: Reading attributes into a macro?
John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Reading attributes into a macro?
I don't want to make a feature that only works on some machines and not all though so would rather stick to non-GRIP for now. I've also never done anything with GRIP so wouldn't know where to start with that.
James