Results 1 to 5 of 5

Thread: SSget Question

  1. #1
    Active Member
    Join Date
    2007-11
    Posts
    68
    Login to Give a bone
    0

    Talking SSget Question

    I have a lisp and want to extend it a little. Can anyone tell me how to use ssget to get 3d polylines and attribute definitions here is an example of what im using (i just want to change text to attribute definition.

    (defun c:textD (/ sset)
    (if (setq sset (ssget "X" (list (cons 0 "text"))))
    (command "_erase" sset "")

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,804
    Login to Give a bone
    0

    Default Re: SSget Question

    For 3D polylines...?
    Something like this....

    Code:
    
    (ssget '((0 . "POLYLINE")(-4 . "&")(70 . 8)))
    
    Basically, you need to use the filtering mechanisms built into (ssget).
    It's all in the developers help.

    EDIT
    I forgot that I had put together a post (actually 2) on this a while back.
    http://cadpanacea.com/node/87
    http://cadpanacea.com/node/88
    Last edited by rkmcswain; 2009-10-09 at 06:30 PM. Reason: add links
    R.K. McSwain | CAD Panacea |

  3. #3
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: SSget Question

    Quote Originally Posted by Zuke View Post
    I have a lisp and want to extend it a little. Can anyone tell me how to use ssget to get 3d polylines and attribute definitions here is an example of what im using (i just want to change text to attribute definition.

    (defun c:textD (/ sset)
    (if (setq sset (ssget "X" (list (cons 0 "text"))))
    (command "_erase" sset "")
    Are you sure you want attribute definitions? There should be any of those in a drawing. They only belong in block definitions which are not accessible via a selection set.

    Now, if you are trying to find someone else's stupid mistakes, then you just need to use the DXF entity type as described in the DXF Reference.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  4. #4
    Active Member
    Join Date
    2007-11
    Posts
    68
    Login to Give a bone
    0

    Talking Re: SSget Question

    Thanks guys for your help.

    Im a hydraulic consultant and i have to clean up architects drawings all the time. That said, i xplode all blocks contained in there drawings and delete all text and attributed text (i only keep levels which i repaste in after i run my clean up lisps).
    If i can select 3d polylines which i need to explode and turn into normal poly lines and delete all attributes ill be a happy chappy.

    Again thanks for your help.

  5. #5
    Active Member
    Join Date
    2007-11
    Posts
    68
    Login to Give a bone
    0

    Default Re: SSget Question

    Quote Originally Posted by rkmcswain View Post
    For 3D polylines...?
    Something like this....

    Code:
    
    (ssget '((0 . "POLYLINE")(-4 . "&")(70 . 8)))
    
    Basically, you need to use the filtering mechanisms built into (ssget).
    It's all in the developers help.

    EDIT
    I forgot that I had put together a post (actually 2) on this a while back.
    http://cadpanacea.com/node/87
    http://cadpanacea.com/node/88
    I got the following to work but I cant get it to explode.

    Code:
    
    (defun c:polyx (/ sset)
      (ssget "x" '((0 . "POLYLINE")(-4 . "&")(70 . 8)))
      (setq sset (ssget "p"))
      (command ".erase" "p")
      (princ)
    );defun
    
    Any ideas

Similar Threads

  1. SSGET question
    By Frank Dux in forum AutoLISP
    Replies: 1
    Last Post: 2013-06-21, 08:53 PM
  2. Simple ssget syntax question, I hope.
    By tufofi in forum AutoLISP
    Replies: 8
    Last Post: 2010-08-17, 04:48 AM
  3. SSGET returns error - bad SSGET list
    By tany0070 in forum AutoLISP
    Replies: 2
    Last Post: 2007-03-09, 07:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •