Rectangular array problem

Rectangular array problem

almutaz_86
Advocate Advocate
1,691 Views
4 Replies
Message 1 of 5

Rectangular array problem

almutaz_86
Advocate
Advocate

Good evening

I have a problem with rectangular array ..

When I work on any plan its run in wrong way(except top), in other work plans Its changing number between columns,  rows and levels

How to fix this problem? 

 

 

I was wrote - before this time- a post here and thank for @Ed__Jobe he give me a good solutionbut not working with rectangular array, and he advised me to write a post and give a good describe for the problem 

 

 

0 Likes
1,692 Views
4 Replies
Replies (4)
Message 2 of 5

Ed__Jobe
Mentor
Mentor

You still haven't told us very much about the problem. We have no way to duplicate your problem so we can troubleshoot it. Provide things like a sample dwg and block. If  you can't provide them, at least give us a screen shot. A copy of the code you're using would be nice.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 5

almutaz_86
Advocate
Advocate

Sorry

Sub rectarry()

Dim boxx As Acad3DSolid, center(0 To 2) As Double
Dim length As Double, width As Double, height As Double
Dim NFR As Long, NFC As Long, NFL As Long
Dim DBR As Double, DBC As Double, DBL As Double
Dim rectarry As Variant

center(0) = 100: center(1) = 100: center(2) = 100
length = 200: width = 200: height = 200
Set boxx = ThisDrawing.ModelSpace.AddBox(center, length, width, height)
NFR = 2: NFC = 5: NFL = 5: DBR = 1000: DBC = 1000: DBL = 1000
rectarry = boxx.ArrayRectangular(NFR, NFC, NFL, DBR, DBC, DBL)

End Sub

Try to run this code when you work on any work plan - except top -

I hope that well help 🙂 

 

0 Likes
Message 4 of 5

Ed__Jobe
Mentor
Mentor

When I run it, no matter the view, an array is correctly created in the World UCS. If you desire to create an array in say the Front view, then you need to change the coordinate system before you create the array.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 5

almutaz_86
Advocate
Advocate

Good morning @Ed__Jobe but

Maybe you did something wrong

Please go to autocad and run the code then change the color for all drawn boxes to red.

then change yor workplane to front (( draw a circle..its should look a circle not line))then run the code again 

 

 

0 Likes