dgcad Posted September 9, 2016 Posted September 9, 2016 Hello, I save parts of my dwg-drawing as a DXF file. There are to create a lot of individual DXF files. Currently I use this command dxfout. Problem: The objects to be saved are not on the 0,0 coordinate in the dwg. In the DXF file, the stored object must be on the 0,0 coordinate. The file is stored in the same path as the dwg. At the moment so I do this: A. Copy object on 0,0 coordinate (dwg) B. Save this object as dxf with dxfout command) C. Rename DXF file like headline over objekt question: Is there a lisp program that can summarize the steps A-B or ABC. The program should have the following questions: 1: choose object for dxf- export 2: choose 0-Point 3: select M-text for new File name 4: Confirm Quote
BIGAL Posted September 10, 2016 Posted September 10, 2016 (edited) Pretty easy there is two variables extmax & extmin they are exactly that your drawing area, so just write a lisp or simple macro to do what you want. macro ^c^c^pmove;w;(getvar "extmin");(getvar "extmax");;(getvar "extmin");"0,0" (setq pt1 (getvar "extmin")) (setq pt2 (getvar "extmax")) (command "move" "W" pt1 pt2 "" pt1 "0.0,0.0") or (command "move" "W" (getvar "extmin") (getvar "extmax" ) "" (getvar "extmin") "0,0") keyboard copy to command line note space on end move w (getvar "extmin") (getvar "extmax") (getvar "extmin") (list 0 0) Edited September 11, 2016 by BIGAL Quote
dgcad Posted September 10, 2016 Author Posted September 10, 2016 Hello Bigal, thanks for your answer. I tried to save this code as dvb-file. But it doesn't work. ACAD says "Incorrect file Format" I also tried to copy your code directly in the command line. ACAD says " etxmin unknown command " I also tried to save as lisp - line by line - but it doesn't work. Sorry but I'm a Dummy in VBA and lisp. Could you send the complete code? Thanks for your help Quote
ReMark Posted September 10, 2016 Posted September 10, 2016 Isn't the code provided by BIGAL a macro? 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.