Showing posts sorted by date for query selsim. Sort by relevance Show all posts
Showing posts sorted by date for query selsim. Sort by relevance Show all posts

2008-07-08

Customization: Hot Topics

I thought I'd share with you today, a little listing of some posts I have come across in the customization newsgroup on the Autodesk Discussion Groups. These are just topics that I found fairly interesting to read; I hope you enjoy some of them, too (if you don't want to read through the whole list, don't forget to utilize your browser's 'Find' command to locate a certain topic - CTRL + F).

I've listed the original thread title, the username of the original poster, the date the thread was begun and then a short description of the topic:

Please, Need Help with this problem - Crislem - 6/27/08
application that copies attributes properties and transfers them to all other attributes in the drawing with the same tag in the same block, multiples drawings.

Need a new version of Distance - lsaapedd - 6/5/08
Distance utility shows results in various units (current units and metric units)

Launch Toolbar from Menu - AlbertRKK - 5/12/08
Describes how to launch a custom toolbar from a pulldown menu

Swap Layer Colors - KDispoto - 4/30/08
(see 5/1 reply from Jason Piercey)

Flatten Command - CadTun - 4/18/08
Check out the replies for a couple of Flatten Routines

Block Description at Tooltip - DrewJones - 3/13/08
A couple of simple suggestions for getting block information to show up

Force Anonymous Block redefinition - Hutch - 02/08/08
(any comments on whether Ajo1's suggestion works well or offer alternatives?)

Return Answer using DYN - nvanlaar - 1/29/08
Posted lisp routine adds up dynamic parameters, but, returns results in the command line
Various suggested work arounds, and one solution posted

Move object to z=0 - adwelling - 1/11/08
lisp routine posted to move a selected object to 0 'Z' elevation

I want to delete all mtext with a height 2.5 - syria89 - 1/8/08
users give multiple suggestions for automating the selection and deletion of entities of a specific type

How to replace %%U for {\L on MTEXT - Alex Diaz - 11/14/07
reminder that this is case-sensitive so %%U and %%u are not equal

xref path drive letter - rickdputo - 10/7/07
suggestions on repathing with the Reference Manager (application external to AutoCAD, availabe since R2004)
op made use of scripting with Express Tool 'REDIR' (Express > File Tools > Redefine Path)

Better SelectSimilar Command! - Nrhoads - 6/28/07
Commentary and variations on SelSim command that I'm already so fond of!

Attention All Logitech Mouse / Keyboard Users! - docsaintly - 6/28/07
tips on configuring extra mouse buttons to perform CUI functions in AutoCAD, alternative driver
(I haven't tried this one yet, although I've been meaning to)

*E Anonymous Blocks - Joe Burke - 6/26/07
discussion on type origin of anonymous blocks with certain prefixes (eg. *E, *D, *U & *X) and how to work with them

anonymous blocks - bustr - 3/22/07
link posted to file Unanon.lsp and article listing origins for *U, *E, *X, *D and *A prefix blocks and replacement tips

How to find duplicate text string ? - weechoo - 6/11/07
lisp routine draws lines between identical strings of TEXT or MTEXT
another posted displays a summary report

Insert Titleblock - Brynn-PHi - 5/17/07
tips to user who wants to insert titleblock and get attribute dialog box, rather than the cmd line

Rename Layout Tabs - S Buckley - 5/17/07
lisp routine to rename layout tabs

Plot Multiple Layouts on a single sheet - Ken Dispoto - 5/16/07
flexible lsp routine creates an array of layouts to plot multiple layouts on one sheet

Anyone ever heard of this routine? - Dave Drahn - 5/15/07
moves text in a displacement relative to it's current rotation

Annotative text gets HUGE!! - galleyslave - 5/9/07
lisp routine takes an attribute (or text) and capitalizes it (doesn't work well with annotative text objects)

Batch Processing - Jason@Draftech - 4/11/07
Best practices and resources for batch-processing CAD files (lsp, vba, scripting, scriptpro)

English to Metric Dimensions - jsteve2 - 4/11/07
user wants to use imperial units, but, have them show up with both imperial and metric when dimensioning

How to get an MLeaderStyle object - Allen Johnson - 4/5/07
posted routine provides a method of searching for and returning and mleaderstyle object

Check Numbers - shinji130 - 3/29/07
routine provided to find duplicate text strings, but, user still wanted to know if there is a way to search for text strings missing from a sequence

Simplify polylines - hmsilva - 3/12/07
suggestions for simplifying polylines, removing duplicate vertices, weed.lsp

Rotate view in floating viewport horizontal - theman1771 - 3/7/07
dview twist, ucs and macro suggestions

Compare two lisp files? - hutch - 2/26/07
method for using microsoft word to compare two files

Drawing Compare - Schmid, Martin - 2/25/03 (updates in 08)
methods and software for comparing two drawing files for differences

Applying page setup to drawing - ipower_BH - 2/14/07
routine posted

Load layers from comma delimited text file - Patrick Porter - 2/7/07
two websites given as resources

qselect in command line - varun_bose - 2/7/07
cannot be done, use ssget instead

2006-07-27

Adding SelectSimilar to Right-Click menu in 2005 and below

Adding SelectSimilar to the right-click menu in AutoCAD 2005:

In a previous post, I showed some code from Adam W, and now we're going to create an easy way to access that command.

First, I’ve got to find the ACAD.MNS file (run ROAMABLEROOTPREFIX to find = "C:\Documents and Settings\UserName\Application Data\Autodesk\Autodesk Map 3D 2005\R16.1\enu\Support"
(I usually like to make a copy of this before I get started… just in case ).

We’ll be adding the new command under the ***POP502 section (this is the right-click menu that shows when objects are selected)

You can navigate to desired location in your .mns in Notepad by using C TRL+F (or Edit menu + Find) and typing in the section name.

Then enter the following code where you’d like the command inserted. I chose to place it under QSELECT’s entry:
ID_SelectSimilar [Select &Similar]selsim ^P



Save the file and restart AutoCAD.

Once you’ve selected an entity, you'll see your command in the right-click menu and you’ll have the instant ability to find all similar items without tedious picking (or figuring out the necessary options in QSELECT, which is also handy at times).

I know how to pick em: SelectSimilar routine

EDIT 4/6/2010: SelectSimilar has been present in vertical products such as AutoCAD Architecture, however, due to the popularity of this post, I'd like to note that in AutoCAD 2010, this command was included in a package of extra tools offered to subscription users, and in 2011, it is present in vanilla AutoCAD as a native command.

In MAP3D 2006 there is a tool, accessed by most via the right-click menu, called SelectSimilar.

Once you’ve selected an object(s), you use this command to add all other similar entities throughout the drawing to your selection set. (I believe this tool is also available in Architectural Desktop [ADT])

I’ve heard quite a buzz on the newsgroups from MAP users who’ve upgraded to 2007 and are disappointed to see that this command is no longer available in it’s current form. That made me upset, so I’d been keeping my eyes open to see if anyone had come up with a routine which will accomplish the same thing… even going so far as asking people if they knew what sorts of things a command like that would look at and could they write something up.

Well… I finally found that special someone who could help me! Adam Wuellner, whose acquaintance I made via the Autodesk Newsgroups. He has kindly allowed me permission to post his code here:
(edit: Adam updated his code, and I am posting the new in here 7/28/06)



;;; Select Similar
;;; (based on a command found in a few versions of AutoCAD)
;;; written by Adam Wuellner
;;; all rights released

;--------> MAIN ROUTINE
(defun c:selsim  (/ ss1 i ent filter_list type-layer filter sstemp)
  (if (not (setq ss1 (cadr (ssgetfirst))))
    (setq ss1 (ssget)))
  (setq i           0
        filter_list '())
  (repeat (sslength ss1)
    (setq ent (entget (ssname ss1 i))
          i   (1+ i))
    (setq type-layer (list (assoc 0 ent) (assoc 8 ent)))
    (if (not (member type-layer filter_list))
      (setq filter_list (cons type-layer filter_list))))
  (foreach filter  filter_list
    (princ (strcat "selecting all " (cdar filter) " entities on layer " (cdadr filter) "...\n"))
    (setq sstemp (ssget "X" filter))
    (setq ss1    (ss:union ss1 sstemp)
          sstemp nil))
  (sssetfirst nil ss1)
  (princ))

;--------> UNION
(defun ss:union  (ss1 ss2 / ename ss-smaller ss-larger c)
  (cond ((and ss1 ss2)
         (setq c 0)
         (if (< (sslength ss1) (sslength ss2))
           (setq ss-smaller ss1
                 ss-larger ss2)
           (setq ss-larger ss1
                 ss-smaller ss2))
         (while (< c (sslength ss-smaller))
           (setq ename (ssname ss-smaller c)
                 c     (1+ c))
           (if (not (ssmemb ename ss-larger))
             (ssadd ename ss-larger)))
         ss-larger)
        (ss1 ss1)
        (ss2 ss2)
        (t nil)))


I have used this with success in MAP2005 as well as 2006.


If you’re not sure how to use this code, here are the steps to take:

Copy the above code, paste into notepad, save as SelectSimilar.lsp into an appropriate location on your hard drive.

When in AutoCAD (whatever flavor) type APPLOAD at the command line, navigate to the .lsp file you’ve just created (while accessing APPLOAD look for the little briefcase icon, where you can set to have the routine load on startup).

Once the routine is loaded: select an object, then type ‘selsim’ to run.

Look for my next post on how to add this command to your right-click menu in AutoCAD 2005 and below.