GRIP setting for directory variable
GRIP setting for directory variable
(OP)
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
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





RE: GRIP setting for directory variable
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