Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
May 25, 2006
Messages
23
Location
GB
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......
 
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

Back
Top