+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Forum Newbie
    Computer Details
    KeithSWD's Computer Details
    Operating System:
    OSX
    Using
    AutoCAD 2014
    Join Date
    May 2013
    Location
    London
    Posts
    5

    Default SSGET X with wildcard not working (Autocad Mac)

    Registered forum members do not see this ad.

    I am using Autocad 2013 for Mac, which as I understand has the same Autolisp capabilities as the Windows product (but no Visual etc).

    I have loads of drawings from consultants using Vectorworks which when converted to Autocad contain masses of single-instances of blocks, all named Group-something. I want to explode them all. But I am hitting a brick wall because my routine is not finding any blocks. So I tried just entering this at the command line to troubleshoot:

    Code:
    (setq ss (ssget "X" '((0 . "INSERT") (2 . "Group*"))))
    It returns Nil. I have double checked, and the blocks are all there waiting to be exploded...

    I am fairly novice at Autolisp. I can't figure out what is wrong. Any help appreciated!

  2. #2
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,003

    Default

    The filter seems valid. It is possible that you are using a localized version of AutoCAD? Please try to add an underscore in front of the selection mode:
    Code:
    (ssget "_X" '((0 . "INSERT") (2 . "Group*")))
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  3. #3
    Forum Newbie
    Computer Details
    KeithSWD's Computer Details
    Operating System:
    OSX
    Using
    AutoCAD 2014
    Join Date
    May 2013
    Location
    London
    Posts
    5

    Default

    I am using the UK version (probably the same as US). Unfortunately the underscore doesn't help.

    I think it might be a Mac version issue then. I'll try the routine on a Windows based install when I get a chance. Thanks.

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,962

    Default

    Are the blocks dynamic?
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  5. #5
    Forum Deity MSasu's Avatar
    Discipline
    Construction
    MSasu's Discipline Details
    Occupation
    engineer
    Discipline
    Construction
    Details
    AutoLISP programmer
    Using
    AutoCAD 2013
    Join Date
    Mar 2009
    Location
    Brasov, Romania
    Posts
    4,003

    Default

    Good observation, Lee!
    I don't work with dynamic blocks, so always forget that they behave differently...
    Regards,
    Mircea

    AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

  6. #6
    Forum Newbie
    Computer Details
    KeithSWD's Computer Details
    Operating System:
    OSX
    Using
    AutoCAD 2014
    Join Date
    May 2013
    Location
    London
    Posts
    5

    Default

    Embarrassingly, I have just discovered the root of my problem. Nothing to do with the code. It turned out there was block inserted at about 1/1000th of its normal size, which contained all the Group* blocks, amongst other things. I had not spotted it. In my defence, the drawing originated outside our office and was not created with Autocad... ! This block's name did not begin with 'Group' so it was not being exploded itself by my routine.

    Sorry for taking up your time but thanks for trying to help.

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,962

    Default

    Registered forum members do not see this ad.

    No worries Keith - I'm glad you were able to resolve your problem!
    Thank you for sharing the outcome.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

Similar Threads

  1. ssget sequence mode ssget incorrect
    By rodrigo_sjc_sp in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 7th Mar 2013, 04:52 pm
  2. Wildcard text search
    By johnengineer in forum AutoCAD General
    Replies: 9
    Last Post: 29th May 2012, 02:51 pm
  3. Selection Sets w/Wildcard??
    By ILoveMadoka in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 25th Mar 2010, 05:52 pm
  4. Wildcard selection sets
    By ollie in forum AutoLISP, Visual LISP & DCL
    Replies: 11
    Last Post: 1st Jul 2009, 11:30 am
  5. Using a wildcard with a lisp command
    By Ydnat in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 8th Aug 2006, 07:35 am

Bookmarks

Posting Permissions

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