Arrayrect Macro

Arrayrect Macro

davidschnegg7
Contributor Contributor
523 Views
6 Replies
Message 1 of 7

Arrayrect Macro

davidschnegg7
Contributor
Contributor

I was trying to create a macro tool button for the rectangular array command.

 

My Goal:

Hit the macro tool button

Select an object to array

Default of 4 columns with a spacing of 4 inches

Default of 1 row

End command.

 

I can then manipulate the amount columns afterwards with the grips. And tweak the spacing in the ribbon if necessary.

 

So far I create a macro and tried this:

 

^C^C_arrayrect;col;4;4;r;1;1;;

 

It's only initiating the macro command, but not entering the column numbers I want.  

I obviously don't know what I'm doing.

 

0 Likes
Accepted solutions (1)
524 Views
6 Replies
Replies (6)
Message 2 of 7

ВeekeeCZ
Consultant
Consultant
Accepted solution

Try this? \ is for user input.

 

^C^C_arrayrect;\;@1,1;@1,1;col;4;4;r;1;1;;;

 

The command prompts run from a macro are slightly different than if run from the command line:

Select objects:

Type = Rectangular Associative = Yes

Specify opposite corner for number of items or [Base point/Angle/Count] <Count>: @1,1

Specify opposite corner to space items or [Spacing] <Spacing>: @1,1

Select grip to edit array or [ASsociative/Base point/Rows/Columns/Levels/eXit]<eXit>: col

Enter the number of columns or [Expression] <1>: 4

Specify the distance between columns or [Total/Expression] <1.879>: 4

Select grip to edit array or [ASsociative/Base point/Rows/Columns/Levels/eXit]<eXit>: r

Enter the number of rows or [Expression] <2>: 1

Specify the distance between rows or [Total/Expression] <1.000>: 1

Specify the incrementing elevation between rows or [Expresson] <0.000>:

Select grip to edit array or [ASsociative/Base point/Rows/Columns/Levels/eXit]<eXit>:

 

 

0 Likes
Message 3 of 7

davidschnegg7
Contributor
Contributor

Thank you so much!  It works perfectly now.

 

I appreciate the explanation for how you create the code.  

0 Likes
Message 4 of 7

pendean
Community Legend
Community Legend
0 Likes
Message 5 of 7

davidschnegg7
Contributor
Contributor

Thank you for that link.  I was looking for that information today when I was tinkering.

 

 

 

0 Likes
Message 6 of 7

pendean
Community Legend
Community Legend

@davidschnegg7 wrote:

Thank you for that link.  I was looking for that information today when I was tinkering.

 


You're welcome. here is a tip from an old-timer like me: avoid using spaces for <enter> if you are ever tempted, a semi-colon is easier to see and count when you need to fix an errant macro 🙂

0 Likes
Message 7 of 7

Sea-Haven
Mentor
Mentor

Have you thought about a lisp can have a front end dcl where you enter all the values, so pick object/s and fill in info. The dcl can have default values preset.

0 Likes