Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have a subfunction that should be simple. It prompts the user to select a specific block, and checks to make sure it's the right block. To get the attribute value I'm using LeeMac's vl-getattributevalue, but the object sent to that must be a VLA object. When I try to send the existing block, I get the error: bad argument type: VLA-OBJECT (<Entity name: 260bab32cf0> (530143.0 5.43758e+06 0.0))
When I try to make a vla object from the block, I get the error: bad argument type: lentityp (<Entity name: 260bab32cf0> (530136.0 5.43756e+06 0.0))
The function is below,
(defun Select03 ( / BsSlct LError L03V L03VLA)
(setq LError 1)
(while (eq LError 1)
(progn
(setq Lyt03 (entsel "\nPlease select the SHEET 03 rectangle"))
(setq L03VLA (vlax-invoke (vlax-ename->vla-object Lyt03)))
(setq L03V (entget (car Lyt03)))
(if
(and
(eq (cdr (assoc 0 L03V)) "INSERT")
(eq (LM:vl-getattributevalue Lyt03 "MAPSHTNUM") "03")
)
(setq LError 0)
(princ " Invalid selection")
)
)
)
)
The block is attached. I have a rather large LISP using this block and it functioned fine when converted to a vla object or an acad object, in that one. The only difference I can see is that in the working LISP it gets group selected whereas in this one the user clicks on it.
Am I missing something basic? It's been a few months since I coded,
Thanks for any help,
Gorra
Solved! Go to Solution.