AutoCAD for Mac General

Reply
Contributor
badboidavid
Posts: 11
Registered: ‎08-06-2007
Message 1 of 18 (4,623 Views)

Flatten drawing - Polylines + Lines

4623 Views, 17 Replies
01-12-2012 11:13 AM

Is there a way to flatten all the Polylines + Lines to a specified Z height?

 

I have tried Change>properties>Elevation>0 

and it only worked for some of the lines.....

 

I cant get the "Flatten" command to work...

 

thanks

*Expert Elite*
maxim_k
Posts: 3,631
Registered: ‎07-22-2010
Message 2 of 18 (4,618 Views)

Re: Flatten drawing - Polylines + Lines

01-12-2012 12:20 PM in reply to: badboidavid

Hi,

The old trick that works in both AutoCAD and AC LT is to move objects, that you want to flatten far away along Z axis and than move to previous place, so you can use such macros (you can add them via CUI command to ToolSets Palette or to Pull-down menu):
1. Flatten selected objects to WCS:

 ^C^C_UCS;_W;_SELECT;\_MOVE;_p;;;0,0,1e99;_MOVE;_p;;;0,0,-1e99 



or
2. Flatten selected objects to current UCS:

 ^C^C_SELECT;\_MOVE;_p;;;0,0,1e99;_MOVE;_p;;;0,0,-1e99 



After you select this macro from menu or from ToolSets, you have to select object(s), hit Return and everything you have selected will be flatten (even 3d solids, meshes, 3d polylines ad splines)

EDIT: if you will put this macro to ToolSets Palette, you can even attach an icon from "real" ExpressTools command, just type RCDATA_16_FLATTEN in image field in CUI editor:

Screen_shot_2011-11-16_at_9.54.03.png

HTH

Maxim

Architect
MARSS

MacACAD | MARSS


*Expert Elite*
3wood
Posts: 971
Registered: ‎03-25-2009
Message 3 of 18 (4,612 Views)

Re: Flatten drawing - Polylines + Lines

01-13-2012 12:45 AM in reply to: badboidavid

Please try CHZ20.vlx

 

3wood

CAD KITS

*Expert Elite*
maxim_k
Posts: 3,631
Registered: ‎07-22-2010
Message 4 of 18 (4,607 Views)

Re: Flatten drawing - Polylines + Lines

01-13-2012 04:59 AM in reply to: 3wood

3wood wrote:

Please try CHZ20.vlx

 

3wood

CAD KITS


VLX doesn't supported in AutoCAD for Mac.

 

Maxim

Architect
MARSS

MacACAD | MARSS


Contributor
hofeller
Posts: 14
Registered: ‎10-23-2011
Message 5 of 18 (4,596 Views)

Re: Flatten drawing - Polylines + Lines

01-14-2012 12:40 PM in reply to: maxim_k

Dear Maxim,

 

Many thanks for the usefull Macro (and the insturction for adding it..)

is there a way to add a keyboard shortcut to apply it?

 

Hagay

*Expert Elite*
maxim_k
Posts: 3,631
Registered: ‎07-22-2010
Message 6 of 18 (4,589 Views)

Re: Flatten drawing - Polylines + Lines

01-15-2012 01:17 AM in reply to: hofeller
Hi Hagay,

hofeller wrote:

is there a way to add a keyboard shortcut to apply it?

 


Yes, you can try to use one of the methods:

1. Simple one: Creating shortcuts for custom commands in AutoCAD for MAC (use method 2 from the post)

2. More complicated method Edit and Create Shortcuts in AutoCAD for MAC? YES it is possible! Part two (advanced)

 

For #1 I used Snow Leopard, but such way should work in Lion too.

 

HTH

Maxim

Architect
MARSS

MacACAD | MARSS


Active Contributor
gregory
Posts: 48
Registered: ‎08-12-2012
Message 7 of 18 (2,972 Views)

Re: Flatten drawing - Polylines + Lines

04-29-2013 10:17 PM in reply to: maxim_k

Not really working out for me!  I added it to the CUI, then added it to the Tool set under custom.

 

When I select it asks for 1st point of displacement then 2nd point of displacement.  I just said 0,0,0 for both...

 

What do you think it's up?

 

Thanks,

 

-G

 

*Expert Elite*
maxim_k
Posts: 3,631
Registered: ‎07-22-2010
Message 8 of 18 (2,964 Views)

Re: Flatten drawing - Polylines + Lines

04-29-2013 11:19 PM in reply to: gregory

Hi Gregory,

 

Before you use this macro be sure, that noting is selected in your drawing. If you select objects and call this macro - it doesn't work properly.

 

Maxim

Architect
MARSS

MacACAD | MARSS


Active Contributor
gregory
Posts: 48
Registered: ‎08-12-2012
Message 9 of 18 (2,961 Views)

Re: Flatten drawing - Polylines + Lines

04-29-2013 11:43 PM in reply to: maxim_k

this is what i get when i activate the command:

 

Command: _MOVE
1 found
Specify base point or [Displacement] <Displacement>: _p
Point or option keyword required.
Specify base point or [Displacement] <Displacement>:
Specify displacement <0'-0", 0'-0", 0'-0">:

 

it'ls like a move command thing...

*Expert Elite*
maxim_k
Posts: 3,631
Registered: ‎07-22-2010
Message 10 of 18 (2,957 Views)

Re: Flatten drawing - Polylines + Lines

04-30-2013 12:05 AM in reply to: gregory

Do you have any object(s) selected before you call script?

On my side everything works fine - ScreenCap.mp4

and doesn't work with preselected object - ScreenCap with selected obj.mp4

 

Maxim

 

Architect
MARSS

MacACAD | MARSS


You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community