Jump to content

AutoLISP Routine to Automatically Update Text in AutoCAD Layouts


Recommended Posts

Posted

"Hello everyone, I'm looking for a Lisp routine that can automatically replace text within a layout. For example, if I have a text 'See box on page 3/5' in layout 1, and the page number changes to 4/5, I want the text to automatically update to 'See box on page 4/5'. I've seen LeeMac's Lisp for automatic layout creation, but I'm not sure if I can adapt it to this specific task. Could anyone please help me with this? Thank you very much."

Posted

Can you attached example drawing 

Posted

If you look at using a field in the text there is a property "Taborder" which is the layout number that gets you the "4" you can also add 1 to the field so that makes the "5"". Other wise need a edit text function. Yes need a dwg.

 

 

Posted
9 hours ago, hosneyalaa said:

Can you attached example drawing 

I wrote a message on page 1 in the layout. Currently, there are only 2 pages in the layout.
Screenshot2025-01-24112146.thumb.png.4b719ae0fc1727c6f5798b7455d07dbe.png

This is an object on page 2.

Screenshot2025-01-24112212.thumb.png.38efa6f91cc01de66151c1682f1ddc35.png
Then, when I added the layout to have 4 pages, the object from page 2 moved to page 3.Screenshot2025-01-24112250.thumb.png.ebc6aaa9743c433c283fe2f398a54f7b.png
I want the text I wrote as "Page 2/2" to automatically change to "Page 3/4." Is it possible to do this? Where should I start learning? I once saw a Lisp by Leemac that automatically changes the Layout page. I wonder if it could be adapted for this purpose.
Screenshot2025-01-24112312.thumb.png.6253f866ce314c4ced20b6da2b660db1.png


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...