Jump to content

Recommended Posts

Posted

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

09-09-2016 11-46-25.jpg

Posted (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 by BIGAL
Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...