Print Page | Close Window

Select similar plain autocad not working

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=3061
Printed Date: 31.May.2026 at 23:32


Topic: Select similar plain autocad not working
Posted By: CAD-Addict
Subject: Select similar plain autocad not working
Date Posted: 21.Jan.2010 at 16:01
Hi,
I found the tip on how to add the select similar option that ACA has to plain autocad here
http://www.cadforum.cz/cadforum_en/qaID.asp?tip=6365 - http://www.cadforum.cz/cadforum_en/qaID.asp?tip=6365
the tip tells u to create a button or a shortcut menu with the following command as macro
(cadr(sssetfirst nil (ssget"_X"(list(cons 0(cdr(assoc 0(entget(car(entsel"\nSelect object and all similar: "))))))))))
the string of commands works fine when I paste it in the command line, but when I create a button or a shortcut menu entry for this, the string is entered only this way
(cadr(sssetfirst nil (ssget"_X"(list(cons 0(cdr(assoc 0(entget(car(entsel"
missing the last part of the string and thus making the command not work
any clues? I am using AutoCAD 2010.
Thanks


-------------
www.CAD-Addict.com



Replies:
Posted By: Vladimir Michl
Date Posted: 21.Jan.2010 at 22:14
You can define a function in a LSP file loaded through a MNL file or ACADDOC.LSP. Then simply call that function:
 
(defun XXX ()
 (cadr(ssetfirst .....)
)
 
(XXX)
 
Please note that the Subscription Advantage Pack for AutoCAD 2010 (plus version 2011...) already contains the [CMD]SELECTSIMILAR[/CMD] command.


-------------
Vladimir Michl (moderator)
ARKANCE - https://arkance.world" rel="nofollow - https://arkance.world - Autodesk Platinum Partner



Print Page | Close Window