×
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

NX Drafting Boarders with TCEng

NX Drafting Boarders with TCEng

NX Drafting Boarders with TCEng

(OP)
Does anyone have any macros for resizing drawing sheets with titles within Teancenter? Currently we have specification master files within the database which reference pattern information so it creates our title block when we create a drawing. However were finding when we resize our sheets say from A3 > A2 we have to pull the pattern information through again?

Does anyone have a slick way of being able to resize drawing sheets and using the correct title information? Or does anyone have a better way of automating this process?

RE: NX Drafting Boarders with TCEng

187lockdown,

We had a similar situation where I worked, but ran into a problem with the formats.  The legacy propriatary statement had to stay the same, and an EC record kept of the drawing size change (From an internal standpoint, the "drawing" was considered the "document of record"...but this is a whole different discussion).  The legacy notices, drawing formats, decals, notes, etc. were in a standard library in the native environment, while "new" formats, notices, etc. were kept in the teamcenter db (might still be a seperate part file, tab'd note, or whatever now...).

With these constraints, I wrote a couple of grips that essentially solved our needs, although there were still some manual 'prep-work' involved.  Toughest part was figuring out how to encode/decode the Tce partfile names and revisions.  I never figured out how to process the revision in Tce...

In a nutshell, what your asking for is pretty complex depending on how your "system" works.  However, I'd  be happy to share what I have and perhaps you can hack something together based off this, if interested.

Regards,
SS
CAD should pay for itself, shouldn't it?

RE: NX Drafting Boarders with TCEng

(OP)
Hi Shadowspawn,

Any help with getting automating this solution would be great! Using the insert & replace pattern util is getting painful.

RE: NX Drafting Boarders with TCEng

do you by chance know GRIP?

Regards,
SS
CAD should pay for itself, shouldn't it?

RE: NX Drafting Boarders with TCEng

*shameless bump*

187lockdown...

I do have a couple of grips that should get you what you need, but they will require some editing depending on how your system is set up (where your patterns are stored: native / Tce, the use of separate prt files for dwg decals and prop notices, etc...).  If your still interested, I'd be happy to share what I have.  The only caveat is that I couldn't get the latest pattern revision from Tce properly decoded when searching.  Our fix was to keep the patterns in the native std lib, since it was already vast and there were others in the company pushing to keep it in native.

Still interested?

Regards,
SS
CAD should pay for itself, shouldn't it?

RE: NX Drafting Boarders with TCEng

(OP)
Hi,

Your grip program sounds good. Do you have a download area I could pull it down from? Maybe the UGS Gtac area?

  

RE: NX Drafting Boarders with TCEng

187lockdown,

This grip was originally written to swap out old formats with new ones... I think it should work in your case if you change the drawing sizes of each sheet before running the grip.  Of course, you'll have to edit somethings in the routine (directory path for separate part files representing a 'std lib' in the native environment, as well as part name and revision to be used in the Tce environment of the patterns, etc...) before compiling it, but this should get you pretty close...

This routine calls the new patterns based on the dwg sheet size, the width specicically....

Hope this helps...

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$                                                                   $$
$$  Program Name:  format-swap-w2k.grs  *W2K*                        $$
$$                                                                   $$
$$  Author:        Mike Thompson                                     $$
$$                                                                   $$
$$                                                                   $$
$$  Release Date:  09-Aug-2005                                       $$
$$                                                                   $$
$$  Abstract:      This program replaces the existing format patterns$$
$$                 and proprietary notices, regardless of dwg size.  $$
$$                 This routine is dependant upon Teamcenter for the $$
$$                 patterns.                                         $$
$$                                                                   $$
$$  Required sub-routines: None                                      $$
$$                                                                   $$
$$    Assumptions:   The revision of Team Center parts WILL NOT change,$$
$$                 because at this time the routine will NOT auto-   $$
$$                 matically pick up the latest revisions...only the $$
$$                 revision "hard-coded" into the routine is used.   $$
$$                                                                   $$
$$                 The drawings are to current standards or practices$$
$$  Revisions:                                                       $$
$$                                                                   $$
$$      By   Date          Description                               $$
$$      ---  -----------   ----------------------------------------  $$
$$      MWT10-02-2005    Corrected for condition if INFO sht       $$
$$                         when starting grip routine                $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  section - a:  declare and initialize variables                   $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    GRIPSW/ DECLRV        $$ Force declare all variables

    NUMBER/    w,     $    $$ Drawing width size /INCHES
            xc,dxc,xp,$
            yc,dyc,yp,$
            sv_wlayer,$ $$ Original work layer
            drwcnt,$    $$ Variable to increment dwgs
            num,$       $$ number of dwg shts to add
            M(12),$     $$ General Matrix > Matrix Name
            P(12),$   $$ Decal Matrix > Matrix Name
             x

    STRING/    shname(102,30),$ $$ array for dwg names
            sheetn(102),$   $$ sheet numbers
            filename(132),$
            logo(132),$
               pnm(32),lnm(32),snm(32),znm(32),$        $$ std part name
               prv(13),lrv(32),srv(32),zrv(32),$        $$ std part rev
            tmsg(40),$        $$ # dwg shts text message
            trp(40),$        $$ # dwg shts variable response
            nxtsht(102),$        $$ next sht name
            INFO(4),SH1(4),$
            PATH (100),$
            PATH2(100),$
            dwgnm(10),$        $$ Name of new dwg sheet
            sh(4),$
            dwgsht(3)        $$ sheet number

    ENTITY/    ptext,d17,hslogo    $$ Name of decals to import

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  section - b:  check for active part & dwg sht present            $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$        
        IF/ &ACTPRT ==0,$  $$IF part NOT active
                PRINT/    'You must have a part file open.',$
                           'Open a part file and try again.',$
                           'Terminating progam.'
                           
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ section - c: initialize & declare variables                       $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
        x=0
        yc=0
        w =0        $$ dwg sht width
        PATH2 = '/datm/stdlib/draw/'     $$ Unix Path
        PATH = 'k:\datm\stdlib\draw\'  $$ W2K Path
        INFO = 'INFO'
        SH1 = 'SH1'
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ section - d: How many new dwg sheets desired?                     $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
            PRINT/'*** REPLACING ALL FORMATS FOR DWG SHEETS ***'
            PRINT/'       ...please be patient.'

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  section - e: cycle db, count number of dwg shts                  $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
        INEXTN/62            $$ 62=Drawings only
        
DRWC0:  drwcnt=0

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  section - f: delete all formats                                  $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
        &WLAYER = 249
        MASK/ 10 $$ patterns only
        DELETE/ALL
        PRINT/ 'All formats deleted...'
$$ Deletes appropriately named proprietary info blocks from dwg's        
    IF/ drwcnt==0
d2:            DELETE/&ENAME(1,'decals-17',IFERR, DRWC1:)
            PRINT/' deleting ''decals-17'' group from file...'
            JUMP/d2:

$$ Set to info sheet, x incrementer to determine proper format NOT
$$    based on drwcnt

DRWC1:    IFTHEN/ &CURDRW<>INFO
            drwcnt=drwcnt+1
            x=x+1
        ENDIF
        IFTHEN/ &CURDRW==INFO AND drwcnt==0
            drwcnt=1
        ENDIF
        shname(drwcnt)=&CURDRW
        &CURDRW=shname(drwcnt)
          sheetn=shname(drwcnt)
        shname(drwcnt)=NEXTN/IFEND,ERR020:
        &CURDRW=shname(drwcnt)
        IF/ &CURDRW==INFO,JUMP/DRWC1: $$ Omits INFO sht

DRWC2:      

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  section - g: cycle db, Verify dwg sht size                       $$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
        DRAWV/,,,,,w,IFERR,ERR030:   $$ Determines dwg sheet width
        PRINT/shname(drwcnt)+' Width is ' + ISTR(w)

$$ Determine dwg sheet size
DWGSZ:
$$ D size
        IFTHEN/ w==34        
                xc=-11
                yc=0
                xp=0
                yp=-12
                dxc=34            $$ New dwg width
                dyc=22            $$ New dwg height
            $$ IMAN Pattern file and Rev to retrieve
                    pnm='PATTERN-D-CONT'
                    prv='A'    
                    snm='PATTERN-D'
                    srv='B'
                    lnm='PATTERN-LOGO-XX'
                    lrv='-'

$$ E size
            ELSEIF/ w==44
                    xc=0
                    yc=0
                    xp=0
                     yp=0
                    dxc=44        $$ New dwg width
                    dyc=34        $$ New dwg height
            $$ IMAN Pattern file and Rev to retrieve
                    pnm='PATTERN-E-CONT'
                    prv='A'        
                    snm='PATTERN-E'
                    srv='B'
                    lnm='PATTERN-LOGO-XX'
                    lrv='-'
$$ J55 size

            ELSEIF/ w==55
                    xc=11
                    yc=0
                    xp=0
                    yp=0
                    dxc=55        $$ New dwg width
                    dyc=34        $$ New dwg height
            $$ IMAN Pattern file and Rev to retrieve
                    pnm='PATTERN-J55-CONT'
                    prv='000'        
                    snm='XX-PTRN-J55'
                    srv='D'
                    lnm='PATTERN-LOGO-XX'
                    lrv='-'
$$ J66 size
            ELSEIF/ w==66
                    xc=22
                    yc=0
                    xp=0
                    yp=0
                    dxc=66        $$ New dwg width
                    dyc=34        $$ New dwg height
            $$ IMAN Pattern file and Rev to retrieve
                    pnm='PATTERN-J66-CONT'
                    prv='B'
                    snm='PATTERN-J66'
                    srv='C'
                    lnm='PATTERN-LOGO-XX'
                    lrv='-'
$$ J88 size
            ELSEIF/ w==88
                    xc=44
                    yc=0
                    xp=0
                    yp=0
                    dxc=88        $$ New dwg width
                    dyc=34        $$ New dwg height
            $$ IMAN Pattern file and Rev to retrieve
                    pnm='PATTERN-J88-CONT'
                    prv='B'        
                    snm='PATTERN-J88'
                    srv='C'
                    lnm='PATTERN-LOGO-XX'
                    lrv='-'
$$ J110 size
            ELSEIF/ w==110
                    xc=66
                    yc=0
                    xp=0
                    yp=0
                    dxc=110        $$ New dwg width
                    dyc=34        $$ New dwg height
            $$ IMAN Pattern file and Rev to retrieve
                    pnm='PATTERN-J110-CONT'
                    prv='B'    
                    snm='PATTERN-J110'
                    srv='C'
                    lnm='PATTERN-LOGO-XX'
                    lrv='-'
            ELSE
                    PRINT/ '    Invalid dwg sheet size..',$
                            '    This routine WILL NOT work...'
$$                    JUMP/DRWC1:
        ENDIF

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  section - h:    Add formats updated format
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
        &WLAYER = 249
        MASK/ 10 $$ patterns only

        P = MATRIX/TRANSL,xp,yp,0  $$ Decal Matrix
        M = MATRIX/TRANSL,xc,yc,0
$$ Pattern

        IFTHEN/ x==1 and drwcnt==1
            filename = UGMGRE/PRTNUM,snm,PRTREV,srv
            PATRET/filename   $$ Dwg format, IMAN
            logo  = UGMGRE/PRTNUM,lnm,PRTREV,lrv
            PATRET/logo,M
            PRINT/'      Format and logo added, sht 1'
        
        ELSE
            filename = UGMGRE/PRTNUM,pnm,PRTREV,prv
            PATRET/filename
            PRINT/ '      Format added to continuation sheet...'

$$ Add Proprietary Decal Block
            d17=RPATTG/PATH+'decals-17.prt',$
            P,LAYER,NOVIEW,IFERR,ERR020:
            PRINT/ '      PROPRIETARY RIGHTS decal added...'
        ENDIF
        
        LAYER/WORK,250,REF,249
        
        JUMP/DRWC1:



    
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$   section - j:  ERRORS:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


ERR010: PRINT/ ' Error importing pattern...terminating program.'
        JUMP/ CANCEL:
ERR020: PRINT/ ' End of Drawings'
        PRINT/ '   Terminating program.'
        JUMP/ CANCEL:
ERR030: PRINT/ ' Dwg width size could NOT be determined'
        JUMP/ CANCEL:
ERR040:    PRINT/' INVALID DWG SIZE, CHANGE EXISTING DWG SIZE AND TRY AGAIN.'
        JUMP/ CANCEL:        
ERR050: PRINT/ ' Error deleting dwg pg ''x''...'
        JUMP/ CANCEL:
ERR999: PRINT/' This routine not working YET for this size dwg sht.'
        PRINT/'   Terminating program'
        JUMP/ CANCEL:

CANCEL:    &CURDRW=INFO

        

        MESSG/ '  READ THE INFO DIALOGUE BOX FOR IMPORTANT INFORMATION'
        PRINT/ '  '
        PRINT/ ' *************************************************************'
        PRINT/ '   It''s the detailers responsibility to ensure that formats'
        PRINT/ '   have been swapped out correctly, ESPECIALLY with LEGACY drawings.'
        PRINT/ '   In the past, Some patterns have been:'
        PRINT/ '      *Put on incorrect layers'
        PRINT/ '      *Expanded into the dwg sheet view, so that it''s no longer'
        PRINT/ '       a pattern.'
        PRINT/ '      *And just about everything else you can think of...'
        PRINT/ ' '
        PRINT/ '   This routine does not check or correct these format problems.'
        PRINT/ '   ADDITIONALLY, you are responsible for any text additions or'
        PRINT/ '   deletions that need to take place with updating formats.'
        PRINT/ ' *************************************************************'

        &WLAYER = 250 $$ Restore work layer
        HALT

Regards,
SS
CAD should pay for itself, shouldn't it?

RE: NX Drafting Boarders with TCEng

ugiismart - how does one purchase the software from the website you mentioned?  Can't seem to find anything except information about the software product.

RE: NX Drafting Boarders with TCEng

abeschneider - I think you should contact thru :
http://www.ugsoftstore.com/contact_us.asp
to request a quote for the product. This website does not sell standart products , they customize and tailors their products according to user's specifications... I guess that's the reason why you can't see any price info there ...

regards ,

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