Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

GRIP setting for directory variable 1

Status
Not open for further replies.

gergs

Computer
Aug 20, 2004
94
Hey guys,

See code below. I want to open a part from a directory by reading a system variable in GRIP. This ones yakking. Any ideas???

I can use this structure in other areas to map to a directory. But GRIP doesnt like it. It cant find the path to open he part. I want to be able to read a standard directory on an NT machine that may be on different drives for each users machine when it loads. Im using the UG install right now but may change. Problem is it wont read this to start with.

Thanks!!!



NUMBER/RSP
STRING/PNAM(80)
DATA/PNAM,'${UGII_BASE_DIR}\mypart.prt'

CHOOSE/'Start seed Part',$
'Exit',$
'Continue',$
DEFLT,1,RSP
JUMP/EXIT:,EXIT:,,,EXIT:,GO:,RSP
$$____________________________________________________________________

GO:

print/PNAM

FETCH/PART,PNAM
$$_____________________________________________________________________
EXIT:
HALT
 
Replies continue below

Recommended for you

You need to tell UG what the environment variable is set to. GRIP doesn't know how to read them directly.

part_dir = envvar/ugii_base_dir,ask

pnam = part_dir + '\mypart.prt'


We defined a system environment variable for the directory separator (/ or\) depending on if the system was Unix or Windows. Then we did this in our programs:
dir_del=envvar/'IR_DELIM',ask
partnam=part_dir+dir_del+'mypart.prt'





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

Part and Inventory Search

Sponsor