Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading attributes into a macro?

Status
Not open for further replies.

JamesWingfield

Automotive
Joined
Apr 16, 2007
Messages
2
Location
GB
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
 
I'm not 100% sure. I think I do have that as part of my license file (GMS4050 if that helps?), but other users are using an NX11110 license file and I don't think it's included in those.

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top