Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/27/2021 in all areas

  1. Or just (defun c:request () (setq lay_tab (layoutlist)) (if (member "Floor" lay_tab) (alert "Layout ist created") (alert "Layout is not created") ) )
    2 points
  2. As you said, 'lay_tab' is a list, not a string. wcmatch accepts a string as an argument. You would need to iterate through every item in the list. This should do it (untested). (defun c:request () (if (vl-some (function (lambda (a) (wcmatch a "*Floor*") ) ) (layoutlist) ) (alert "Layout is present") (alert "Layout is not present") ) )
    2 points
  3. This works: (vla-getformula (vlax-ename->vla-object (car (entsel))) 1 1 0)
    2 points
  4. Another way, this is case sensitive. (defun C:foo (/ layexists) (vlax-for lay (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))) (if (vl-string-search "Floor" (vla-get-name lay)) (setq layexists lay) ) ) (if (= layexists nil) (alert "\nLayout \"Floor\" missing") (alert "\nFloor layout in Drawing") ) (princ) )
    1 point
  5. Glad to help I do my repeats slightly different, note this processes in opposite order starting at last. Its just preference both ways work. (repeat (setq i (sslength ent)) (setq rec (vlax-ename->vla-object (ssname ent (setq i (1- i))))) ... ; no need for i + 1 ) ; repeat
    1 point
  6. T.Willey's code at TheSwamp may be what you're looking for https://www.theswamp.org/index.php?topic=12437.msg153343#msg153343
    1 point
×
×
  • Create New...