Save Selection of objects as DXF

Save Selection of objects as DXF

Anonymous
Not applicable
1,993 Views
2 Replies
Message 1 of 3

Save Selection of objects as DXF

Anonymous
Not applicable

Hi everyone,

 

I'm trying to create a macro to export selected objects as DXF to the same folder as the main drawing.

 

In previous versions of AutoCAD it used to work fine, all I needed to do was selecting the source point and write the name of the final file to be saved but when I tried this with 2018 I can only save with the same name as original drawing..If I write another name it won't work.

 

I cant see what I'm doing wrong, any help would be much appreciated.

 

This is the code:

 

^C^C_dynpicoords;1;_undo;_m;_select;_auto;\_move;_p;;\0,0;_move;_p;;0,0,0;@0,0,1e99;move;_p;;0,0,0;@0,0,-1e99;_zoom;_o;_p;;-overkill;_p;;_p;_n;_i;_c;_d;_dxfout;\V;R12;O;_p ;16;_undo;_b;

 

 

Thanks1-SELECT OBJECTS1-SELECT OBJECTS2-SELECT SOURCE POINT2-SELECT SOURCE POINT3-SPECIFY NAME3-SPECIFY NAME4-WON'T SAVE ANYTHING WITH A DIFFERENT NAME FROM THE ORIGINAL FILE.4-WON'T SAVE ANYTHING WITH A DIFFERENT NAME FROM THE ORIGINAL FILE.

 

 

 

0 Likes
Accepted solutions (1)
1,994 Views
2 Replies
Replies (2)
Message 2 of 3

paullimapa
Mentor
Mentor

Hm..I did not encounter any problems.

You can try and see what happens at the command line if you used lisp this to invoke the command:

(command"dxfout")

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 3

Anonymous
Not applicable
Accepted solution

Did you try to give a different name from the original file?

 

It works if I use the same name as original file, otherwise gives me an error.

 

In this case I'm trying to save as  "ddddd"

Command: _dynpicoords

Enter new value for DYNPICOORDS <1>: 1

Command: _undo
Current settings: Auto = On, Control = All, Combine = Yes, Layer = Yes
Enter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back] <1>: _m

Command: _select

Select objects: _auto

Select objects: Specify opposite corner: 3 found

Select objects:

Command: _move

Select objects: _p
3 found

Select objects:

Specify base point or [Displacement] <Displacement>:
Specify second point or <use first point as displacement>: 0,0

Command: _move

Select objects: _p
3 found

Select objects:

Specify base point or [Displacement] <Displacement>: 0,0,0

Specify second point or <use first point as displacement>: @0,0,1e99

Command: move

Select objects: _p
3 found

Select objects:

Specify base point or [Displacement] <Displacement>: 0,0,0

Specify second point or <use first point as displacement>: @0,0,-1e99

Command: _zoom

Specify corner of window, enter a scale factor (nX or nXP), or
[All/Center/Dynamic/Extents/Previous/Scale/Window/Object] <real time>: _o

Select objects: _p
3 found

Select objects:

Command: -overkill

Select objects: _p
3 found

Select objects:

Current settings: Tolerance=0.000001, Ignore=Color, Optimize polylines=No, Combine partial overlap=Yes, Combine end-to-end=Yes
Enter an option to change [Done/Ignore/tOlerance/optimize Plines/combine parTial overlap/combine Endtoend/Associativity] <done>: _p

Optimize segments within plines [segment wiDth/Break polyline/Yes/No] <No>:_n

Current settings: Tolerance=0.000001, Ignore=Color, Optimize polylines=No, Combine partial overlap=Yes, Combine end-to-end=Yes
Enter an option to change [Done/Ignore/tOlerance/optimize Plines/combine parTial overlap/combine Endtoend/Associativity] <done>: _i

Specify properties to ignore when comparing objects...
[None/All/ Color/LAyer/Ltype/ ltScale/LWeight/Thickness/TRansparency/plotSTyle/Material] <Color>:_c

Current settings: Tolerance=0.000001, Ignore=Color, Optimize polylines=No, Combine partial overlap=Yes, Combine end-to-end=Yes
Enter an option to change [Done/Ignore/tOlerance/optimize Plines/combine parTial overlap/combine Endtoend/Associativity] <done>: _d

0 duplicate(s) deleted
0 overlapping object(s) or segment(s) deleted
Command: _dxfout
Enter DXF file name <A:\Library\TCL Blocks.dxf>: ddddd

Current DXF settings: Precision= 16 Format= ASCII Preview= No Version= 2018

Enter decimal places of accuracy (0 to 16) or [Binary/select Objects/Preview/Version] <16>: V

Enter version [R12(LT2)/2000(LT2000)/2004(LT2004)/2007(LT2007)/2010(LT2010)/2013(LT2013)/2018(LT2018)] <2018>: R12

Enter decimal places of accuracy (0 to 16) or [Binary/select Objects/Preview/Version] <16>: O

Select objects: _p 3 found

Select objects:

Enter decimal places of accuracy (0 to 16) or [Binary/Preview/Version] <16>: 16

Error: DXFOUT aborted
Command: _undo
Current settings: Auto = On, Control = All, Combine = Yes, Layer = Yes
Enter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back] <1>: _b
DXFOUT -OVERKILL ZOOM MOVE MOVE MOVE SELECT
Mark encountered

me but if I want to save with a different one won't work.

 

0 Likes