Jump to content

Search the Community

Showing results for tags 'ssget'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 22 results

  1. Can someone help me to find the solution for some doubts. If someone will make one lisp for this, so I think I will get answer for few doubts I need to draw a pline inside this 4 line using line point like this My doubts 1 how to get “line point” with window selection (4 line all pints not in window only 4 line 4 point) (setq p1 (getpoint "\nSelect object...")) (setq p2 (getcorner p1)) (setq mp (polar p1 (angle p1 p2) (/ (distance p1 p2) 2))) (setq p1 (list (nth 0 p1) (nth 1 p1))) (setq p2 (
  2. How can I add a filter in ssget...? Actually, I want to select only unlocked line with cross selection. is it possible with this": L" (setq lines (ssget "_C" p1 p2 (list (cons 0 "LINE")))) like this (ssget "_+.:S:E:L" '((0 . "ARC,CIRCLE,ELLIPSE,LINE"))) this is not getting how. can i add can someone help (ssget "_+.c:L" '((0 . "ARC,CIRCLE,ELLIPSE,LINE"))) i want to edit this lisp (setq p1 (getpoint "\nSelect object...")) (setq p2 (getcorner p1)) (setq mp (polar p1 (angle p1 p2) (/ (distance p1 p2) 2))) (setq p1 (list (nth 0 p1) (nth 1 p1))) (setq p2 (li
  3. i need only select lines. But it's not coming. (defun c:DE () (setq p1 (getpoint "\nSelect object...")) (setq p2 (getcorner p1)) (setq mp (polar p1 (angle p1 p2) (/ (distance p1 p2) 2))) (setq p1 (list (nth 0 p1) (nth 1 p1))) (setq p2 (list (nth 0 p2) (nth 1 p2))) (setq lines (ssget "_C" p1 p2 ((list (cons "LINE"))))) (if (/= (sslength lines) 4) (alert "4 lines need to be selected")))
  4. This lisp for working select single block but i want to need create dimension for multiple block. help me!! (defun C:Bdim ( / ) (if (and (setq sel (entsel "Select a block: ")) (= (cdr (assoc 0 (setq nfo (entget (car sel))))) "INSERT") ) (vlax-for item (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))(cdr (assoc 2 nfo))) (setq items (vlax-vla-object->ename item)) (setq EntityData (entget items)) (if (= (cdr (assoc 0 EntityData)) "LINE") (progn (vl-cmdf "_.dimaligned" "_non" (cdr (assoc 10 EntityData)) "_non" (cdr (assoc 11 EntityData)
  5. Hello Everybody, this is my first post and I'd like to know a little bit more about the ssget command. I already searched the world wide web for various search keywords, but couldn't find references / lists, especially of the Associative codes and object types. I also read a lot of articles about that command, but most of them use these Associative codes: http://www.lee-mac.com/ssget.html https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2017/ENU/AutoCAD-AutoLISP/files/GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3-htm.html http://www.afralisp.net/autolisp/tutorials/s
  6. Hi, I am trying something like this: (setq ed (entget (car (entsel)))) (setq lyr (cdr (assoc 8 ed))) (setq clr (cdr (assoc 62 ed))) How can I get a selection set based on layer and color of a given object? Something like: (setq objs (ssget "X" '((cons 8 lyr) (cons 62 clr)) ) ) [i know this is not working I write it just to give the idea.] and then change the objects' layer to "0" and color to 2. Thank you in advance tso
  7. Hi, Sorry for the heading, I spelt entsel all wrong. Can someone change that please. I'm selecting a closed polyine using an entsel and the using an ssget to select other objects. How do I filter out that entsel item. Like so: (setq ent_1 (car (entsel "\nPlease select something"))) Then filter it. I read in the docs you can't filter an entity (code 0). So how do I accomplish this? My feeble attempt: (while (not ent_1) (setq ss_1 (ssget '((0 . "LWPOLYLINE") (-4 . "=") (70 . 1)))) )
  8. Goal: To select all the the objects I want to manipulate at once using a selection window, then the lisp program modifies the properties of just the Circle Entities in that selection. Below I am currently just changing the color property. After modifying the circles, I would like to modify all polyline & LWpolylines with a separate color change. I do not want to have to select the objects twice. Hopefully if this is possible I would like to followup saving Mtext or Text entites in another list. Below is where I have landed after two days of searching for solution. I am not a novice to
  9. (setq axd (vla-AddDimAligned spc d1 d2 ex)) (vla-Copy axd) (vl-cmdf "_.explode" "_l" "") ;could not find an ActiveX equivalent for this (setq del (ssget "_p")) ;errors here, does not set the variable and exits routine Can someone shed some light? What is the deal with the above? I am able to type the last expression at the command line after error and it sets the variable fine, so it seems to recognize the previous entities after lisp exits but not during for some reason. Also, is there a way to explode dims other than the command method? Thanks in advance!
  10. How can I filter a selection of hatch by gradient name using ssget fonction? The exeample bellow works well for standard hatch name... it does not work for gardient WORK: (setq ss (ssget "_X" (list '(0 . "HATCH")'(2 . "GRASS")))) DONT WORK: (setq ss (ssget "_X" (list '(0 . "HATCH")'(2 . "gradient")))) OR (setq ss (ssget "_X" (list '(0 . "HATCH")'(2 . "gr_spher")))) Could you help me?
  11. Hello everyone. I am having a mental blank as i am sure i know the solution to this but cannot remember I am trying to have a shortcut to select all xrefs starting with X* I have tried this but i does not work. (defun c:xrss () (command "SELECT" (ssget "X" (list (cons 0 "INSERT") (cons 2 "X*") ) ) "" ) ) However this does work (defun c:xrerase () (command "erase" (ssget "X" (list (cons 0 "INSERT") (cons 2 "X*") ) ) "" ) ) Can anyone explain what is happening here. I don't need a quick fix but would like to understand the process
  12. I need to know the end points (p1 and p2) of a line chosen by the user. How can I let them only select a single line? I'm currently using the following: (if (setq ss (ssget '((0 . "LINE")))) (setq l1ent (entget (ssname ss 0))) (setq p1 (cdr (assoc 10 l1ent))) (setq p2 (cdr (assoc 11 l1ent))) This works, but it still allows the user to grab more objects than necessary. I'm thinking I need to use entsel, but what if they select a different object? Would I need to create a while loop to keep prompting them until they choose a line, or is this functionality built into entsel?
  13. I want to learn all of the usage about ssget. who can help me to summarize all the mode of ssget and explain how to use it and give some e.g. at the same time can u tell me the symbols "+" ":" in mode expression means what ? thank you very much !
  14. I found this code on the web somewhere and it works great for a single line of text. I would like to be able to select multiple lines of text and have it do the same. To center several lines of text in an existing rectangle. I am hoping someone already has code to do this rather than hoping someone would code it for me. I am clueless on how to do this.. Many times what I encounter is multiple lines of individual text items. So it may be TEXT or it may be MTEXT. Here is the existing code which works great for a single line of text: ; PLACE TEXT AT THE CENTER OF A BOX OR A
  15. Hello everybuddies, I am new to lisp, so please for your advise. I want to pick an existing multi-segment polyline and use it as a selection fence (ssget "_F") As far as I understand I miss a simple piece of code that lists the points of the polyline in a way that ssget can accept them as a list of points to define the fence. (setq POLY (entsel "\n Pick a Fence Line crossing your beloved entities:")) ****POLY---->(please help!)----->POINTLIST**** (setq ss (ssget "_F" POINTLIST ) ) Thanx in advance
  16. I m trying to make a selection set using a point and a couple of lines passing through this point (caution, NOT terminating). I want to select lines of specific layers. What I m typing is this (setq pt (getpoint "\nSelect point: ")) (setq ss (ssget pt '((0 . "LINE") (8 . "mylayer")))) Unfortunately this doesn't work. The only way I could find is to use this instead (ssget "C" pt pt '((0 . "LINE") (8 . "mylayer"))) However I do not find that helpful at all. If there is a line at the back on an other elevation, not crossing the initial line, but coincidentally passing 'vi
  17. I'm a newbie. And i try to practise some Autolisp example. I write the code below to know how to use entity name in applying command. I collect these entity name in a list and use command "erase to delete it". But some problems happened here. It said " Bad arguments" and i don't know how to resolve it. (defun c:gc (/ p1 p2 data n index) (setq p1 (ssget)) (setq data()) (setq n (sslength p1)) (setq index 0) (repeat n (setq p2 (ssname p1 index)) (setq data (append data p2)) (entmod data) (setq index (+ index 1)) ) (command "erase" p2 "") )
  18. Hey Guys, Ive got this routine which is intended to erase everything visible which is of a colour determined by the user. (defun c:ec () (setq ecc (getint "\nEnter COLOUR of objects to ERASE : ")) (setq CODE 62) (setq pt1 '( -50000000000000 -50000000000000 -50000000000000)) (setq pt2 '( 50000000000000 50000000000000 50000000000000)) (setq ssec (ssget "w" pt1 pt2 '(list (cons CODE ecc)))) (command "ERASE" ssec "") ) The plan is to only ERASE objects which are visible at the time. So the routine should not operate on any objects on hidden layers... but should operate on objects off t
  19. What is wrong with my coding? (defun 1ststring () (if (while (= str nil) (setq ss (ssget ":S" '((0 . "TEXT"))) str (cdr (assoc 1 entget ss)) ) ;_end setq (setq str nil) ) ;_end while ) ;_end if ) ;_end defun
  20. Hi friends, is it possible to add behaviors defined by (initget) function to (ssget) (As most of you know, it is possible for other input functions such as (entsel), (entselp), (getpoint), ...) An example is like this: I appreciate any help
  21. Ahankhah

    ssget "minsert"

    Hi all, is it possible to filter selection set to contain only minserted blocks? If so, how? Thanks to anyone who spends her/his time to get any answer to the problem.
  22. Hi all, I'm hoping someone who knows lisp and object codes could help me convert the attached filter setup into a ssget lisp, so I can call it on the command line, please! I've been looking at this thread, but I can't puzzle my way through it so far. My lisp skills are terrible to nonexistent! http://www.cadtutor.net/forum/showthread.php?21217-FILTER-Command I've attached a screenshot of the filter setup, and here's a clip from the filter.nfl file, if that's more helpful: (-4 . "(1 . "ose to any third party.") (1 . "3510") (-4 . "=") (62 . 166) (-4 . "=") (62 . 72)
×
×
  • Create New...