Does anybody have a Lisp or Script that they would be willing to share for the following.
Move all objects from the farest most lower left corner to 0,0
Move all objects to Layer 0 color by layer linetype by layer
Create LAYER ETCH
Insert Text Line of the FILENAME at 0,0 on a Layer ETCH
zoom to extents
Save as DXF
Move all objects from the farest most lower left corner to 0,0:
(SETQ A (SSGET "X"))
(SETQ B (GETVAR "EXTMIN"))
(COMMAND "MOVE" A "" B "0,0")
Move all objects to Layer 0 color by layer linetype by layer:
(COMMAND "CHPROP" A "" "LAYER" "0" "C" "BYLAYER" "LT" "BYLAYER" "")
Create LAYER ETCH:
(COMMAND "-LAYER" "MAKE" "ETCH" "") you may want to add color, linetype, lineweight, description, etc...
Insert Text Line of the FILENAME at 0,0 on a Layer ETCH:
(SETVAR "CLAYER" "ETCH")
(SETQ C (GETVAR "DWGNAME"))
(COMMAND "-TEXT" "0,0" ".125" "0" C) you can specifiy any text height, but in this example it is set to 1/8".
if you want to preserve the current layer,
(SETQ D (GETVAR "CLAYER"))
(SETVAR "CLAYER" "ETCH")
(SETQ C (GETVAR "DWGNAME"))
(COMMAND "-TEXT" "0,0" ".125" "0" C)
(SETVAR "CLAYER" D)
zoom to extents:
(COMMAND "ZOOM" "EXTENTS")
i am not completely sure about the saveas dxf part. you can set a variable to the full path drawing name:
(SETQ E (GETVAR "DWGPREFIX"))
(SETQ F (STRACT E C))
maybe there is a way to substitute the .dxf for .dwg in the DWGNAME?
@Anonymous.deleurere wrote:
(SETQ C (GETVAR "DWGNAME"))
To substitute "dxf" for file extension in file name:
(strcat (substr c 1 (- (strlen c) 3)) "dxf")
and (setq f (stract ... would be (setq f (strcat ...
(if ("mysolution"=answer) then (click "Accept As Solution"))
------------------------------------------------------------------------------------