Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/09/2020 in all areas

  1. layer_cfg2 : dialog {label="Title"; spacer; : boxed_row { : column {:text{label="test";}:text{label="new";}:text{label="new test";}} : column{ : row {: edit_box {vertical_margin=none;key="eb1";} : image_button {height=1.5;aspect_ratio=1;fixed_width=true;fixed_height=true;color=2;key="ib1";}} : row {: edit_box {vertical_margin=none;key="eb2";} : image_button {height=1.5;aspect_ratio=1;fixed_width=true;fixed_height=true;color=1;key="ib2";}} : row {: edit_box {vertical_margin=none;key="eb3";} : image_button {height=1.5;aspect_ratio=1;fixed_width=true;fixed_height=true;color=5;key="ib3";}} } } ok_cancel; }
    1 point
  2. Yea, exactly that. I updated the code at the previous post, but I guess it mustn't have been updated considering that your post above shows the earlier code before it was updated. I simply modified the below snippet: (setq datum (progn (initget 1) (getpoint "\nSpecify point for datum: ")) elev (progn (initget 1) (getreal "\nSpecify elevation at specified datum: ")) vtxlist (vl-remove-if-not '(lambda (x) (eq (car x) 10)) (entget (car es))) hgts (mapcar '(lambda (x) (+ elev (- (caddr x) (cadr datum)))) vtxlist) ) Simply using (initget 1) to make sure that the user does really input a number and doesn't press enter in order to have getreal return nil. And of course prompting the user for the elevation height for calculation
    1 point
  3. One thing worth noting is that you can also localize your functions too that lies inside a function, hence why I localized C above.
    1 point
  4. Try this routine : (defun c:numberpages ( / *error* objectid layoutof adoc aobj ct e o ) (vl-load-com) (defun *error* ( m ) (if ct (setvar 'ctab ct) ) (if m (prompt m) ) (vla-regen adoc acactiveviewport) (princ) ) (defun objectid ( o ) (vla-getobjectidstring (vla-get-utility adoc) o :vlax-false) ) (defun layoutof ( o ) (vla-item (vla-get-layouts adoc) (cdr (assoc 410 (entget (vlax-vla-object->ename o))))) ) (setq adoc (vla-get-activedocument (setq aobj (vlax-get-acad-object)))) (setq ct (getvar 'ctab)) (foreach lay (layoutlist) (setvar 'ctab lay) (vla-zoomextents aobj) (setq e (ssname (ssget "_W" '(5800.0 2000.0) '(6200.0 2200.0)) 0)) (setq o (vlax-ename->vla-object e)) (vla-put-textstring o (strcat "%<\\AcObjProp Object(%<\\_ObjId " (objectid (layoutof o)) ">%).TabOrder>%" "/" "%<\\AcExpr %<\\AcObjProp Object(%<\\_ObjId " (objectid (vla-get-layouts adoc)) ">%).Count>%-1 >%")) ) (*error* nil) ) Regards, M.R.
    1 point
  5. I have the following, but there are still some bugs -
    1 point
×
×
  • Create New...