Print Page | Close Window

Using wildcards in scripts

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DXF formats, Design Review, AutoCAD web, Drive, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=10959
Printed Date: 13.Jun.2026 at 06:31


Topic: Using wildcards in scripts
Posted By: harrissjt
Subject: Using wildcards in scripts
Date Posted: 04.Feb.2015 at 04:06
I am trying to write a script in Autocad 2012 to change attributes in a drawing title block, with limited success.  see script below;
 
;------------------------------------------------------------
;EDIT PROJECT TITLE-E
-ATTEDIT
N
N
A*-TITLE
TITLE1
*
COMPRESSOR GC-201 UPGRADE
TA2015 GC-701 CCC CONTROLLER UPGRADE
;------------------------------------------------------------
;EDIT PROJECT TITLE-R
-ATTEDIT
N
N
A*-TITLE
TITLE4
*
МОДЕРНИЗАЦИЯ КОМПРЕССОРОВ GC-201
КР2015 GC-701 МОДЕРН-ЦИЯ КОНТРОЛЛЕРА ССС
;------------------------------------------------------------
QSAVE
 
;------------------------------------------------------------
The above works perfectly, BUT...I would now like to modify the script to use a wildcard for the 'Enter string to change' line.  This wildcard is to enable the change of ANY existing string to the replacement string.
 
I have tried using *(asterix), but that doesn't appear to work for full strings.
 
Any advice would be greatly appreciated.
 
NB.  I'm trying to keep this really simple and script based only.  So please, no LISP routines.
 
Cheers,
Steve



Print Page | Close Window