×
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 ~ Get all Drawings

Grip ~ Get all Drawings

Grip ~ Get all Drawings

(OP)
Does any know if/how a GRiP programme can create a list of all of the drawings in a part.

Cheers in advance.

B

RE: Grip ~ Get all Drawings

Not sure if this helps it's an extract of an old grip routine for plotting drawings.

$$ ----------------------------------------------------------------------------+
$$   Find the next drawing in the part file                                    |
$$ ----------------------------------------------------------------------------+
     drgfound=0
   
    INEXTN/&DRWG,IFERR,INIDRG:
     NXTDRG:
    
     drgname = NEXTN/IFEND,DRGCHK:
    drgfound=1

It might at least point you in the right direction

 

Mark Benson
Aerodynamic Model Designer

RE: Grip ~ Get all Drawings

GRIP subroutine that finds drawings in a file and sets it active

PROC/RSP1
$$   PROGRAM NAME: RETV_DWG.GRS
$$
$$   PURPOSE: Retrieves dwg layout & makes dwg workview.
$$            A return value of 0 for RSP1 indicates no drawings.
$$___________________________________________________________________
$$
     NUMBER/RSP1,V,s
     STRING/DN1(10,10),LN1(10),size(10),ds1(1),siz(4,1),dwsz(9)
     data/siz,'B','C','D','E'
$$
     V=0        $$ find all the drawings in the part file...
     INEXTN/62
$$
BGN: DN1(V+1)=NEXTN/IFEND,END:
     V=V+1
     JUMP/BGN:
$$
END: IF/V-1,ER2:,L01:,L00:    $$ handle 0, 1, or multiple dwgs
$$___________________________________________________________________
$$
L00: CHOOSE/'SELECT DRAWING',DN1(1..V),DRSP1
     JUMP/ER1:,ER1:,,,,,,,,,,,,DRSP1
     V=DRSP1-4
$$
L01:
     IF/&CURDRW==DN1(V),JUMP/L02:       $$ is dwg already active ?
     &CURDRW=DN1(V)
$$
L02:
     RSP1=1
$$ check for drawing size and units
     size=&ATTVL(PART,'D1-DWGSIZ',iferr,er3:)$$ dwg size attribute
     DS1=substr(size,1,1)            $$ get drawing size
$$ set &csize based on drawing size
     ifthen/&unit==1
        ifthen/DS1=='B' or DS1=='C'
           &csize=.125
        elseif/DS1=='D' or DS1=='E'
           &csize=.156
        endif
     elseif/&unit==2
        ifthen/DS1=='B' or DS1=='C'
       &csize=3.2
        elseif/DS1=='D' or DS1=='E'
       &csize=4.0
        endif
     endif
     JUMP/TRM:
$$___________________________________________________________________
ER1: MESSG/'NO DRAWING SELECTED'
     RSP1=0
     JUMP/TRM:
$$
ER2: MESSG/'NO DRAWING IN FILE'
     RSP1=0
     JUMP/TRM:
er3:
     drawv/,,,,h,,iferr,er4:
     s=intf(h/7.3)
     dwsz=siz(s)+'--------'
     asatt/part,'D1-DWGSIZ',dwsz
     jump/l02:
er4:
     messg/'NO DRAWINGS'
     jump/trm:
$$
trm:
     VIEWLC/VSBL,1..256
$$     &dstate=1
$$     &dstate=2
     return
 

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: Grip ~ Get all Drawings

(OP)
Thank You :)

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