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!

*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

Macro Programming Newbie Question

Macro Programming Newbie Question

Macro Programming Newbie Question

We are new users of UG. We're using UG-NX. I've recorded simple a simple macro and have some questions.

1. Is there a macro programming langauge which supplements the recorder?

2. What is the best source of documentation for the macro language?

3. Can the macro langauge take user input - other than the actual recorded keystrokes, mouse-licks, etc..

4. Are there any other API's, besides the Macro language and the 'c'-based API?

RE: Macro Programming Newbie Question

There is also the GRIP (graphics interactive programming) programming language in UG. This is more similar to FORTRAN or Basic (an early version). I believe the macro recorder can call grip programs but I'm not sure if grip programs can call macros. The best documentation would most likely be UG's help files (and the more you know about programming the better off you'll be). The macros can take user input, there is some sort of wait function or input function (I know it exists but don't have much experience with it, I'm sure the help files will mention it).

p.s. try to avoid those mouse-licks - quite unsanitary! :)

RE: Macro Programming Newbie Question

I have been using GRIP for 15 years to customize UG. I stay away from macros because they are version dependent. I do use them for short term special cases.

There is no real language behind the macros. It is strictly a record of what keystrokes you pressed. If you know what you are doing, you can take a .syslog file and turn it into a macro. You can also edit the macro file to make minor changes to what the original macro did.

UG help files are the best source for documentation for any of the UG programming tools, macros, GRIP or UG/Open API.

There is a user entry and user pause under the Macro recorder that will allow you to input values and such will the maro is in playback mode.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst

RE: Macro Programming Newbie Question

What is the story with GRIP?  I've heard rumors that grip will be phased out eventially.  I'd like to become more familiar with GRIP, but only if it has a future?  Maybe I should focus my attention towards OPEN/API (C++)?
Any Comments?

RE: Macro Programming Newbie Question

Depends on what you want to do with your custom program in UG. there are still some areas of CAM that are not in the API.

EDS has admitted that GRIP is: ""mature".  Not offering anything new, but great at what it does provide." This is from a UG developer.

If your needs are along geometry manipulation, use the PAI. If you only need to manipulate attributes, then GRIP will work.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst

RE: Macro Programming Newbie Question

Here is some more info on my situation.
I have a task to automate our drawing formats across all of our different projects.  We all use the same format, but each group uses different markings (Stamps).  The GRIP program would also add part attributes, apply layer catagory names, and import the format and stamps as patterns.  
I've reviewed other methods like seed parts, macros and template files.  Macros work but cause errors during playback and would probably have to be re-created at each UG upgrade. Seed parts and templates work but I don't think they work with a top down assembly approach.  I haven't spent a lot of time with these, so I could be wrong.
I think GRIP is the best course to take, but I'm being told that GRIP will not be supported and we shouldn't spend time developing GRIP or training on using GRIP.

RE: Macro Programming Newbie Question

Macros are very much version dependent.

Templates work best in a master-model approach, separate drawing file from the model/assembly file.

If you are new to UG customization, I would go with the API over GRIP. They both can do what you have outlined.

I think there is too much legacy GRIP out there for EDS to drop its support. I will agree that they will not enhance it, but I think they will make sure it still works, at least for the next few years.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
CAD/CAM System Analyst

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! Already a Member? Login


Solutions Brief - Protecting and Rescuing On-Ground Personnel
Keeping our warfighters safe and delivering them a competitive advantage is a key goal of departments of defense around the world. It’s a goal shared by embedded computing manufacturers like Abaco: we never forget who we serve.This case study describes how a major international contractor integrated an Abaco single board computer at the heart of its CAS/CSAR solution. Download Now
Datasheet - Top Enhancements Creo 7.0
PTC's Creo 7.0 has breakthrough innovations in the areas of generative design, real-time simulation, multibody design, additive manufacturing, and more! With Creo 7.0, you will be able to design the most innovative products faster than ever before, keeping you on the cutting edge of product design and ahead of your competition. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close