Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro Programming Newbie Question 1

Status
Not open for further replies.

SteveAG

Mechanical
Oct 2, 2001
17
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?
 
Replies continue below

Recommended for you

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! :)
 
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
Ingersoll-Rand
 
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?
 
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
Ingersoll-Rand
 
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.
 
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
Ingersoll-Rand
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor