Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

GRIP

Status
Not open for further replies.

Pondering

Aerospace
May 25, 2006
23
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......
 
Replies continue below

Recommended for you

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor