Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
why of course it can, you need to provide us the block name if you want this to run without promptng for selection
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The block name is BLOCKA and Tag name is DESCRIPTION. But the change I want to update is what's written on the description. So if it says "ISSUED FOR ABCDE", I'd like it to say "ISSUED FOR 12345". Let me know if you need more information.
Thanks, pbejse.
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Have you ever used the AEFINDTERMTEXT command in ACAD Electrical? I've tried but it's not working.
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
If the command isn't working because it says that the command is "Unknown" you may be able to use the command REDEFINE and bring the command "back to life"
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Pbejse - I was wondering if you have a modified version that includes block name (BlockA) and description attribute (DESC) so that if Block A exists, we then check if DESC has "Issued for ABC". If it does, we then update it to say "Issued for XYZ". Thanks in advance.
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
kameron1967 wrote:Pbejse - I was wondering if you have a modified version that includes block name (BlockA) and description attribute (DESC) so that if Block A exists, we then check if DESC has "Issued for ABC". If it does, we then update it to say "Issued for XYZ". Thanks in advance.
Start with this <----
Holler if you hit a snag.
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks, Pbejse! I think I have what I need. But will let you know if I do hit a snag! ![]()
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
How would the second instance of code be modified to account for spaces at the beginning and end of a text string? Thank you!
Rick Yoerger
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
rwydesk500 wrote:How would the second instance of code be modified to account for spaces at the beginning and end of a text string? Thank you!
If I understand correctly, just include them inside the double-quotes wrapping the string, e.g. " issued for construction ". If you might not always have the same number of spaces at the beginning or end of existing strings, you would probably need to use something like this:
(setq tss (ssget "X" '((1 . "*issued for tender*"))))
to find them [though that would also find strings with the same content even if what's outside it is not just spaces], and apply (vl-string-trim) if you want them removed.
Re: Pre-define d find & replace lisp
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I thought the spaces at either end of the word I am replacing was what was preventing it from working. However, it is not. After I load TRC.lsp and type the command, it returns the following error...
"Command: TRC ; error: bad argument type: lselsetp nil"
...not sure why. I cut and pasted the code directly from your post. Thanks
Rick Yoerger


