×
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

GRIP

(OP)
Hi,

I have variuos text strings on a DWG, These individual text strings are all named 'string1, string2 etc'.

Does any have a short bit of example code which will select these text strings by there name (no user selection), read them into a string variable, and then print them to the information window.

Cheers in advance......

RE: GRIP

This should do it:

$$    Program to read and print all of the text strings on a Drawing.
$$
$$    Author:    John R. Baker, P.E.
$$      Title:    Product 'Evangelist'
$$        UGS Corp.
$$        10824 Hope Street
$$        Cypress, CA  90630
$$        714-952-6032
$$        (c)2007 - ALL RIGHTS RESERVED
$$
$$
$$    Release History
$$        
$$    Version 1.0    John R. Baker    14 January, 2007
$$        

    ENTITY/STR_OBJ            $$  String Object
    STRING/STR_NAM(30),    $    $$  String Name
           STR_VAL(132)        $$  String Value

    INEXTE/ALL            $$  Reset indexing
    MASK/25                $$  Mask for Drafting Objects
    EJECT/PRINT            $$  Open Listing Window

F01:

    STR_OBJ=NEXTE/IFEND,END01:    $$  Get next drafting object
    IF/&SUBTYP(STR_OBJ)<>1,JUMP/F01:    $$  Check to see if drafting object is a note
    STR_NAM=&NAME(STR_OBJ)        $$  Extract object name
    STR_VAL=&DMTEXT(STR_OBJ)        $$  Extract text

    PRINT/'*****************************'
    PRINT/' '
    PRINT/STR_NAM
    PRINT/' '
    PRINT/STR_VAL
    PRINT/' '
    JUMP/F01:

END01:                    $$  Termenate program
    PRINT/'*****************************'
    MASK/ALL
    HALT



John R. Baker, P.E.
Product 'Evangelist'
NX Product Line
UGS Corp
Cypress, CA
http://www.ugs.com

RE: GRIP

(OP)
Cheers,

Just what I was after

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