Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 37

Thread: Is there a way to access selection sets in a script?

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

    Default Re: Is there a way to access selection sets in a script?

    Quote Originally Posted by ahefner
    So would this be correct?

    (ssget "_X" '((0 . "LINE,*POLYLINE")))
    That will work, but I would use
    Code:
    (ssget "_X" '((0 . "LINE,POLYLINE,LWPOLYLINE")))
    R.K. McSwain | CAD Panacea |

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

    Default Re: Is there a way to access selection sets in a script?

    Quote Originally Posted by ahefner
    How do you create a LWPL
    Regular old PLINE command. Explore the PLINETYPE sysvar. This determines what kind of polyline will be created.
    R.K. McSwain | CAD Panacea |

  3. #23
    100 Club
    Join Date
    2007-05
    Location
    Fort Worth, Texas Cowtown USA
    Posts
    139
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    I did end up using the second one listed above (no asterick).

    BTW... is there somewhere I can learn these "lisp" commands [...like (ssget"_X" '((0 . "LINE")))...]? Any tutorials you recommend?

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

    Default Re: Is there a way to access selection sets in a script?

    Quote Originally Posted by ahefner
    I did end up using the second one listed above (no asterick).

    BTW... is there somewhere I can learn these "lisp" commands [...like (ssget"_X" '((0 . "LINE")))...]? Any tutorials you recommend?
    The AutoCAD Developers Guide (acad_dev.chm) in your HELP folder.

    On the web, http://www.afralisp.net/ is a good site.
    R.K. McSwain | CAD Panacea |

  5. #25
    100 Club
    Join Date
    2007-05
    Location
    Fort Worth, Texas Cowtown USA
    Posts
    139
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    Quote Originally Posted by rkmcswain
    The AutoCAD Developers Guide (acad_dev.chm) in your HELP folder.
    Thanks, this looks like what I'm after.

  6. #26
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    Quote Originally Posted by rkmcswain
    You just have to be careful when doing this. If Autodesk were to add another POLYLINE type in the future (for example an "MPOLYLINE"), then the wildcard would pick it up.

    Another way would be:
    Code:
    (ssget "_X" '((0 . "POLYLINE,LWPOLYLINE")))
    That makes sense. Thanks for the tip, RK.

  7. #27
    100 Club
    Join Date
    2007-05
    Location
    Fort Worth, Texas Cowtown USA
    Posts
    139
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    Wow, I don't know why I'm having such problems with this...

    My recent use of this new found knowledge was for a custom button macro as follows:
    Code:
    ^C^CZOOM;e;EXPLODE;(ssget "_X" '((0 . "LWPOLYLINE,POLYLINE")));
    But when I click the button, it only explodes one at a time. Very weird unless I'm just unaware that's what I'm telling it to do

  8. #28
    100 Club
    Join Date
    2007-05
    Location
    Fort Worth, Texas Cowtown USA
    Posts
    139
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    But if I type it all in, it works perfect.

    What in the world is wrong with my macro?

  9. #29
    AUGI Addict .T.'s Avatar
    Join Date
    2000-12
    Location
    Lost
    Posts
    1,473
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    Quote Originally Posted by ahefner
    But if I type it all in, it works perfect.

    What in the world is wrong with my macro?
    Have a look at this KB article. Let us know if you need help writing the code.

  10. #30
    100 Club
    Join Date
    2007-05
    Location
    Fort Worth, Texas Cowtown USA
    Posts
    139
    Login to Give a bone
    0

    Default Re: Is there a way to access selection sets in a script?

    Wow, the weird limitations you come across just trying to automate the simplest of tasks.

    Help would be great.

    Here's the idea... I have some xrefs which the architect has added POLYLINEs with a thickness to represent the bathroom stalls and hand rails. I simply need to explode the PLINEs so they loose their thickness and are controlled "bylayer". My button macro reads as follows:
    Code:
    ^C^CZOOM;e;EXPLODE;(ssget "_X" '((0 . "LWPOLYLINE,POLYLINE")));
    Is there a somewhat simple way to adapt what that link was talking about (btw, thanks for the link) to accomplish the task described above?

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. ...Selection sets...
    By davidmatyas in forum VBA/COM Interop
    Replies: 15
    Last Post: 2008-04-02, 07:14 PM
  2. Run a script that sets Variables from a button or drawing startup.
    By SRBalliet in forum AutoCAD Customization
    Replies: 9
    Last Post: 2006-02-21, 11:45 AM
  3. Other (selection sets)
    By gketter in forum AutoCAD LT - Wish List
    Replies: 5
    Last Post: 2005-10-26, 07:11 AM
  4. How to access AutoCAD selection sets
    By venablescranes in forum VBA/COM Interop
    Replies: 2
    Last Post: 2005-02-20, 11:34 PM
  5. Help relating to selection and selection sets
    By csgohjmj in forum AutoLISP
    Replies: 3
    Last Post: 2004-09-17, 03:35 PM

Posting Permissions

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