Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Grip with a file browser window

Status
Not open for further replies.

MSPBenson

Mechanical
Jan 13, 2005
190
0
0
GB
I'm trying to create a grip program and ideally it want's to have a file browser (similar like the window you get when you create a new part) instead of having to type in the path.
Has anyone come across a way of doing this.

Thanks in advance,

Mark Benson
CAD Support Engineer

Mark Benson
CAD Support Engineer
 
Replies continue below

Recommended for you

No, GRIP doesn't support an interface to the UIstyler.


"Wildfires are dangerous, hard to control, and economically catastrophic."
"Fixed in the next release" should replace "Product First" as the PTC slogan.

Ben Loosli
CAD/CAM System Analyst
Ingersoll-Rand
 
loosib is correct in that GRIP does not support this. [sad]

However an out of the box approach [evil] would be to XSPAWN (See UG GRIP Docs)
an external program and have that program write the information to a temp file that GRIP could read.
This can be done in tcl/tk, VB, etc.
I have used it with tcl/tk before I started using Ufunc w/Styler.
Please also note that you can pass ENV variable to your spawned program. This is one way only!!
I use this to pass the file name I want to create to the spawned program.
This is useful because GRIP can wait for the file to be created before continuing. (if you use CONCUR)

To retrieve any information you will have to write it to a file and read it with GRIP.
The following is a GRIP program that will execute a tcl program using ugwish.

GRIPSW/DECLRV
STRING/$
program(132) ,$ UGWISH
execute(132) ,$ program to execute
basedir(132) ,$ ENV Variable UGII_BASE_DIR
z_end $$

$$#######################################################################
basedir = ENVVAR/'UGII_BASE_DIR',ASK
program = basedir + '\MACH\AUXILIARY\ugwish.exe'
execute = 'U:\DV_System\sample.tcl'
XSPAWN/PROG,program,execute

$$#######################################################################
HALT

hope it helps.....
 
Status
Not open for further replies.
Back
Top