sergiu_ciuhnenco Posted January 18 Posted January 18 Hi for Cad Forum Members !!! I have a request for you, can someone help me or advise me, is it possible to enter multiple macro commands in the command line, without creating a macro command? For example : ^C^C_-PLOT;Yes;Canon iR2420 UFRII LT.pc3; ;A3;Millimeters;Portrait;no;Window;2123046.3,-1280415.2;2151746.3,-1240915.2;fit;13.6,0;Yes;monochrome.ctb;Yes;W;No;No;Yes ^C^C_-PLOT;Yes;Canon iR2420 UFRII LT.pc3; ;A3;Millimeters;Portrait;no;Window;2152746.3,-1280415.2;2181446.3,-1240915.2;fit;13.6,0;Yes;monochrome.ctb;Yes;W;No;No;Yes ^C^C_-PLOT;Yes;Canon iR2420 UFRII LT.pc3; ;A3;Millimeters;Portrait;no;Window;2182446.3,-1280415.2;2211146.3,-1240915.2;fit;13.6,0;Yes;monochrome.ctb;Yes;W;No;No;Yes ^C^C_-PLOT;Yes;Canon iR2420 UFRII LT.pc3; ;A3;Millimeters;Portrait;no;Window;2212146.3,-1280415.2;2240846.3,-1240915.2;fit;13.6,0;Yes;monochrome.ctb;Yes;W;No;No;Yes ^C^C_-PLOT;Yes;Canon iR2420 UFRII LT.pc3; ;A3;Millimeters;Portrait;no;Window;2241846.3,-1280415.2;2270546.3,-1240915.2;fit;13.6,0;Yes;monochrome.ctb;Yes;W;No;No;Yes ^C^C_-PLOT;Yes;Canon iR2420 UFRII LT.pc3; ;A3;Millimeters;Landscape;no;Window;2273046.3,-1280415.2;2312546.3,-1251715.2;fit;0,0;Yes;monochrome.ctb;Yes;W;No;No;Yes I created a link between Rhino and AutoCAD, a very good thing that can be used in many cases, finally this multiplemacrocommand is automatically created in a text in AutoCAD, and it would be very simple to just copy this text and enter it in the command line to print everything. Or instead , it could be a solution From macrocomand to create a lisp function Thanks in advance for any sugestions Quote
BIGAL Posted January 18 Posted January 18 Not sure what your plotting but the code is basically plot 2 windows. Some lines are repeated. The windows are a bit of a odd location. You could make a list of the 4 values for as many windows as you want then loop through the list. Doing the plotting. If you use layouts it is much easier and I have plot range of layouts 1-2, all etc. If you can explain more what it is your plotting an image at least then maybe we can help. Quote
sergiu_ciuhnenco Posted January 18 Author Posted January 18 I tried the layout method before, I have been working for many years, the method without layouts proved to be the most effective and the document is much faster, although the computer I work on is quite powerful Quote
sergiu_ciuhnenco Posted January 19 Author Posted January 19 here an example of what I am trying to print , here is an example of column reinforcement and sometimes it could be like 40 types of columns , and document gets very heavy ... this rhino plugin for grasshopper help me also with other trics , and that why , i want to use it also for printing , the list of point is the left down point of page and second pair of point is the upper right the plugin give all the point coordinates and orientation of the page also automatically put the numbers for all pages , automatically know recognize where is the beging and where is the finish Quote
sergiu_ciuhnenco Posted January 19 Author Posted January 19 I have all the information I just need to attach it to a comand , I gues to a lisp one but you are the main GURU , you should know better Quote
BIGAL Posted January 19 Posted January 19 (edited) This task has been answered many times before, just find the outside rectangs and plot them. If the rectangs are blocks its even easier to do. In either case you get the two corners from the object for the plot window. Here is an example. ; simple plot titles in model ; By AlanH (defun plotmodel ( / oldsnap ss2 n xmin xmax xymin ymax ymin index en el inspt) (PROMPT ".....PRINTING DRAWING TO plotter....") (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (setq ss2 (ssget "x" '((0 . "INSERT")(2 . "A3-plotkader")(410 . "Model")))) ; A3-plotkader is the name of the title block (setq n (sslength ss2)) (setq index 0) (repeat n (setq en (ssname ss2 index)) (setq el (entget en)) (setq inspt (assoc 10 el)) ; insertion pt (setq xmin (- (cadr inspt) 6.0)) (setq ymin (- (caddr inspt) 6.0)) (setq xymin (strcat (rtos xmin 2 1) "," (rtos ymin 2 1))) (setq xmax (+ xmin 813.0)) ; hard coded for 813 wide 6mm offset (setq ymax (+ ymin 566.0)) ;hard coded for 566 high (setq xymax (strcat (rtos xmax 2 1) "," (rtos ymax 2 1))) (COMMAND "-PLOT" "Y" "" "Dwg To Pdf" "A3" "M" "LANDSCAPE" "N" "W" xymin xymax "1=2" "C" "y" "Acad.ctb" "Y" "" "n" "n" "y" ) (setq index (+ index 1)) ) (setvar "osmode" oldsnap) (princ) ) (plotmodel) Post a sample dwg only need 1 outside rectang or block. Edited January 19 by BIGAL 1 Quote
sergiu_ciuhnenco Posted January 20 Author Posted January 20 Thank you!!! Really appreciate what you do !!!!!!!!!!!!!!!!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.