×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

GRIP setting for directory variable

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

RE: GRIP setting for directory variable

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

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!


Resources