Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/12/2024 in all areas

  1. @mhy3sx You have the following issues: 1) the "Button" DCL tile cannot have an image, use "image_button" instead. 2) There is no "image" attribute for DCL. With the standard "image" tiles, you can use the "value" attribute, but NOT for "image_buttons". You will have to use (set_tile) at runtime. 3) You don't need to used both the "action" attribute and the (action_tile) calls. I recommend sticking to just using the (action_tile) calls. 4) You need to save the load dialog return value and then unload the dialog at the end. DCL: nort : dialog { label = "North Dialog"; : row { : image_button { key = "north1"; label = "North 1"; is_default = true; } : image_button { key = "north2"; label = "North 2"; } } : row { : image_button { key = "north3"; label = "North 3"; } : image_button { key = "north4"; label = "North 4"; } } ok_cancel; } AutoLISP: (defun c:north (/ dcl) (setq dcl (load_dialog "C:\\north\\north.dcl")) (if (not (new_dialog "north" dcl)) (exit) ) (set_tile "north1" "C:\\North\\NORTH1.sld") (set_tile "north2" "C:\\North\\NORTH2.sld") (set_tile "north3" "C:\\North\\NORTH3.sld") (set_tile "north4" "C:\\North\\NORTH4.sld") (action_tile "button1" "(c:north1)") (action_tile "button2" "(c:north2)") (action_tile "button3" "(c:north3)") (action_tile "button4" "(c:north4)") (start_dialog) (unload_dialog dcl) )
    1 point
  2. @leonucadomi Maybe This? Not able to test it without a drawing. Use command SETCURPSETUP to change the Page Setup of the current layout. You can also remove the (if (= lay (getvar "ctab")) and the end parenthesis, leaving just (putpagesetup lay "IMPRIMIR EN A3") to apply to all layouts. ; Jason Piercey . May 16th, 2003 ; assign a pagesetup to a layout ; [layout] - string, layout name ; [setup] - string, pagesetup to assign ; return: T or nil (defun putPagesetup (layout setup / layouts plots) (defun item-p (collection item) (if (not (vl-catch-all-error-p (vl-catch-all-apply '(lambda () (setq item (vla-item collection item))) ) ) ) item ) ) (and (or *acad* (setq *acad* (vlax-get-acad-object))) (or *doc* (setq *doc* (vla-get-activedocument *acad*))) (setq layouts (vla-get-layouts *doc*)) (setq plots (vla-get-plotconfigurations *doc*)) (setq layout (item-p layouts layout)) (setq setup (item-p plots setup)) (not (vla-copyfrom layout setup)) ) ) (defun c:SetCurPsetup (/ lay) (foreach lay (layoutlist) (if (= lay (getvar "ctab"))(putPagesetup lay "IMPRIMIR EN A3")) ) (princ) ) There is also this: http://www.theswamp.org/index.php?topic=38005.msg430212#msg430212
    1 point
  3. FYI - (getfiled...) will only display a preview image when DWG is used as the extension. See link: https://help.autodesk.com/view/ACD/2024/ENU/index.html?guid=GUID-AD65DF88-5218-4655-B877-B4D33B9FB6D1
    1 point
  4. EDIT3 (short version): So the default concept for alignment in AutoCAD is picking "source and destination" points - atleast 2 pairs, then it asks you to scale the objects. This process is kinda slow and annoying for me. The goal of this lisp is to: 1.Select entities (to be aligned) 2.Pick destination line (as an align reference) 3.Pick source line (to align objects to it) So would it be possible to get the coordinates of the both endpoints of a "source" and "destination" line, and "match" them to be on the same axis? (without questioning to resize the object) and then maybe perform "dynamic" movement locked on that axis?
    1 point
×
×
  • Create New...