pmxcad Posted November 19, 2014 Share Posted November 19, 2014 Hello, Is there a way of combine these 2 lisps? (attachments) I am looking for a lisp that exports layouts to dwg`s by range. I like the lisp "LayoutsToDwgs.lsp" but i am want to select (by range) the layouts to be exported like the lisp "PLOT BY RANGE CTAB.LSP" Is it also possible to change prefix option in the "LayoutsToDwgs.lsp" to Suffix? Thanks, PmxCAD LayoutsToDwgs.lsp PLOT BY RANGE CTAB.LSP Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 19, 2014 Share Posted November 19, 2014 Pretty sure the (layoutlist) function needs replacing by the method I used in the plot by range original code by me Yeah I am Alan H, I am a bit short of time at moment have a couple of posts to catch up on. Just need to work out the Wblock bit. replace the plot bit in plot range.lsp not tested ! (COMMAND "-PLOT" "Y" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" name "" "" ) with this but you need to supply a file name maybe (setq fname (strcat (getvar "DWGPREFIX") (getvar "dwgname") (vla-get-name lay))) (command "_.-wblock" fname "*") ; for civ 3d you may want a "N" to not include map info. Quote Link to comment Share on other sites More sharing options...
pmxcad Posted November 19, 2014 Author Share Posted November 19, 2014 Sorry Alain, it`s not working. Gives an error: error: bad argument type: VLA-OBJECT nil This is the lisp so far? ; ;Plots layouts by range ; By Alan H Feb 2014 ; ; (defun AH:pltlays ( / lay numlay numend) (setq numlay (getint "\nEnter Start tab number")) (setq numend (getint "\nEnter last tab number")) (setq len (+ (- numend numlay) 1)) (repeat len (vlax-for lay (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))) (if (= numlay (vla-get-taborder lay)) (setvar "ctab" (vla-get-name lay)) ) ; if (princ (getvar "ctab")) ) ; for (setq lay nil) ; ; ; ; ; (setq fname (strcat (getvar "DWGPREFIX") (getvar "dwgname") (vla-get-name lay))) (command "_.-wblock" fname "*") ; for civ 3d you may want a "N" to not include map info. (setq numlay (+ numlay 1)) ) ; end repeat ) ; defun (AH:pltlays) Thanks, PmxCAD Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 20, 2014 Share Posted November 20, 2014 Try this ; ;Plots layouts by range ; By Alan H Feb 2014 ; ; (defun AH:pltlays ( / lay numlay numend) (setq numlay (getint "\nEnter Start tab number")) (setq numend (getint "\nEnter last tab number")) (setq len (+ (- numend numlay) 1)) (repeat len (vlax-for lay (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))) (setq fname (strcat (getvar "DWGPREFIX") (getvar "dwgname") (vla-get-name lay))) (if (= numlay (vla-get-taborder lay)) (setvar "ctab" (vla-get-name lay)) ) ; if (princ (getvar "ctab")) ) ; for (setq lay nil) (command "pspace") (command "_.-wblock" fname "*" ) ; for civ 3d you may want a "N" to not include map info. (setq numlay (+ numlay 1)) ) ; end repeat ) ; defun (AH:pltlays) Quote Link to comment Share on other sites More sharing options...
pmxcad Posted November 20, 2014 Author Share Posted November 20, 2014 Nope, sorry Alan. There is no suffix or prefix so it overwrite it selfs. The drawing what has been created has a strange file name en still contains al layouts. I prefer to choose a suffix to the file name. This has been created: 1640BOSR6UED-ELH19000001.dwgR6UED MMX.dwg. 1640BOSR6UED-ELH19000001.dwg is the file name en R6UED MMX is a layout name. PmxCAD Quote Link to comment Share on other sites More sharing options...
pmxcad Posted November 22, 2014 Author Share Posted November 22, 2014 someone else an idea ? Quote Link to comment Share on other sites More sharing options...
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.