AcSelectionSetAll Method

Discussion in 'AutoCAD' started by Ken Alexander, Aug 6, 2003.

  1. It appears in VBA you can use selectionsetall mode with filters in the
    select method, I have attempted this in lisp with no success. Is it
    possible? I know I can use (ssget "x" '((0 . "line"))).

    (vla-select
    selset
    acSelectionSetall
    (vlax-safearray-fill
    (vlax-make-safearray
    vlax-vbinteger
    (cons 0 (1- (length (car dxfcode))))
    )
    (car dxfcode)
    )
    (vlax-safearray-fill
    (vlax-make-safearray
    vlax-vbvariant
    (cons 0 (1- (length (cadr dxfcode))))
    )
    (cadr dxfcode)
    )
    )

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 6, 2003
    #1
  2. Thanks Luis, I've looked thru there sight could only find info on
    vla-selectonscreen method. The help files indicate that you can
    filter acselectionsetall but it's not working.

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 6, 2003
    #2
  3. Frank's BuildFilter function is my all time favorite. It's especially fun
    if you turn on the animation feature of the vlide. However, I now prefer to
    create my selection sets with the venerable old SSGET and then "convert" it
    to ActiveX.

    ( if (ssget "_X" '((0 . "LINE")))
    (setq ss
    (vla-get-activeSelectionSet
    (vla-get-activeDocument
    (vlax-get-acad-object)
    )
    )
    )
    )

    This technique does not work with selection sets created with SSADD.
     
    Bobby C. Jones, Aug 6, 2003
    #3
  4. I could not find the BuildFilter function at Acadx. Are you saying
    that it can be done then? Like I told Luis this is just for fun, I
    can't get it to work and was wondering if it was something I was doing
    wrong.

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 6, 2003
    #4
  5. Found it.

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 6, 2003
    #5
  6. Hey I like that. Much easier to follow than my

    (setq ss (vlassget '((0 8)("line" "0")) T))

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 6, 2003
    #6
  7. I thought it was interesting that the method *didn't* barf on the arrays
    being passed to the point arguments.

    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | Geeze..... Something so simple.
    | Thanks Robert.
    |
    | --
    | Ken Alexander
    | Acad2000
    | Windows2000 Prof.
    |
    | "We can't solve problems by using the same kind
    | of thinking we used when we created them."
    | --Albert Einstein
    |
    | | > You forgot to account for two "optional" arguments.
    | >
    | > (vla-select selset
    | > acSelectionSetall
    | > nil ; <- Point1
    | > nil ; <- Point2
    | > (vlax-safearray-fill
    | > (vlax-make-safearray
    | > vlax-vbinteger
    | > (cons 0 (1- (length (car filter)))))
    | > (car filter))
    | > (vlax-safearray-fill
    | > (vlax-make-safearray
    | > vlax-vbvariant
    | > (cons 0 (1- (length (cadr filter)))))
    | > (cadr filter)))
    | >
     
    R. Robert Bell, Aug 7, 2003
    #7
  8. I know.. If it had, I might have caught it. Usually when optionals
    are omitted, error, error...

    --
    Ken Alexander
    Acad2000
    Windows2000 Prof.

    "We can't solve problems by using the same kind
    of thinking we used when we created them."
    --Albert Einstein
     
    Ken Alexander, Aug 7, 2003
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.