×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Reading attributes into a macro?

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

RE: Reading attributes into a macro?

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources