Jump to content

MAKE NOT VIZIBLE/ERASE THE FIRST OR LAST OBJECT FROM AN ARRAYPATH


socacidan

Recommended Posts

Hello everyone,

 

Is possible to help me with an ideea ? 

I have some arraypath that i would like to have drawn without last element in the row visible... either visible or deleted would be fine.

 

Cant make array path shorter cause i need it to reach a bit far from last item. 

 

I made array with "divide" method so not by "measure"

 

Thank you for your time. 

DanPATH1.thumb.png.ac5f27bcbdf7a298c737e850e50d4499.pngPATH2.thumb.png.3ebf2a58f1d0b2f808aeabddd2933154.png

Link to comment
Share on other sites

If you use a lisp can do what you want as the lisp could work out all the positions say along a line. It would be a simple repeat function for the donuts. Could use polar function to work out next point.

 

If you clarify what the object being added is some one will supply code very quickly.

Link to comment
Share on other sites

BIgAl, not sure this works (weekend and all that, CAD is (mostly) off to test), create array, delete entlast ? if the last item created is always the end of the array, lower right corner in the above examples (which is what I'd need to check)?

Link to comment
Share on other sites

On 4/19/2024 at 8:02 PM, socacidan said:

Hello everyone,

 

Is possible to help me with an ideea ? 

I have some arraypath that i would like to have drawn without last element in the row visible... either visible or deleted would be fine.

 

Cant make array path shorter cause i need it to reach a bit far from last item. 

 

I made array with "divide" method so not by "measure"

 

Thank you for your time. 

DanPATH1.thumb.png.ac5f27bcbdf7a298c737e850e50d4499.png

 

PATH2.thumb.png.3ebf2a58f1d0b2f808aeabddd2933154.png

 

 

 

 

 

ideea is i need the array into a block .. actually i used 4 arrays for each side of the kolomn so that i can use stretch in both directions (horizontal and vertical)

I use method (for the number od donuts) divide cause i need to teel each time different number and i need them at same distancealong the path. 

For the number of donuts i made a separate function so it can be seen in proprieties list of the blok.

All works fine for the blue donuts... cause is not important if last donut overlay on first of next line... , but as you can see in .dwg in attachment, the red circles that i need also have the problem of last one sticking out 

i see that array has an start and end point option... i tried to put there a formula (expression) but is not allowed ... 

 

So if you guys can think of a solution that last element of an array is not seen.. i would be greatful

 

ty

 

 

 

 

2.5cm koloms - test2.dwg

 

 

Link to comment
Share on other sites

Ok 1st comment now we have a dwg I would go back a couple of steps and draw the reinforced concrete shape, if this shape is always a rectnag then can be done with a custom dcl for input. If a concrete beam top and bottom reo can be different. 

 

The step would be outside len, wid

Cover, stirrup dia,

top reo dia & number

Bot reo dia & number

Left & right reo, dia & number

 

Your units are mm so why is shape 60 and not say true size 600mm. That is how I would draw it and matches input. 

 

Not sure what the dashed red circles are, yes I am a civil engineer. The circle conflicts with the stirrup ??

 

 Need to clean this up a bit. 

 

 

let me know what you think about this.

image.png

Link to comment
Share on other sites

This is proof of concept it is in no way finished as I await further info about is this useful.

 


https://www.cadtutor.net/forum/topic/83608-make-not-vizibleerase-the-first-or-last-object-from-an-arraypath/#comment-637284
; concrete beam.

(defun c:conc1 ( / ans wid ht cov topr botr lr rr tnum botnum lnum rnum oldsnap ent ent1 ent2)

(defun ah:chklay (lay col / )
(if (= (tblsearch "Layers" lay) nil)
(command "-layer" "M" lay "C" col "" "")
(setvar 'clayer lay)
)
)

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Width" 5 4 "600" "Height" 5 4 "600" "Cover" 5 4 "50" "Top Reo Dia " 5 4 "12" "Bottom Reo Dia " 5 4 "12"
"Left reo Dia" 5 4 "12" "Right Reo dia" 5 4 "12" "Top number of bars" 5 4 "4" "Bottom number of bars" 5 4 "4" 
"Left number of bars" 5 4 "2" "right number of bars" 5 4 "2" "Stirrup dia" 5 4 "10")))

(if (= ans nil)(progn (alert "now Cancelling ")(exit)))

(setq wid (atof (nth 0 ans))
Ht (atof (nth 1 ans))
cov (atof (nth 2 ans))
Topr (atof (nth 3 ans))
botr (atof (nth 4 ans))
lr (atof (nth 5 ans))
rr (atof (nth 6 ans))
tnum (atoi (nth 7 ans))
botnum (atoi (nth 8 ans))
lnum (atoi (nth 9 ans))
rnum (atoi (nth 10 ans))
stir (atof (nth 11 ans))
)

(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)

(setq pt (getpoint "\nPick lower left pt "))

(ah:chklay "BEAM" 2)
(command "rectang" pt (list (+ (car pt) wid) (+ (cadr pt) ht)))
(setq ent (entlast))
(setq off1 (+ (/ stir 2.0) cov))
(vla-offset (vlax-ename->vla-object ent) (- 0.0 off1))
(ah:chklay "REINF_STIRRUP" 1)
(setq ent1 (entlast))
(command "chprop" ent1 "" "Layer" "REINF_STIRRUP" "")
(command "pedit" ent1 "w" stir "")
(setvar 'filletrad (* 2 stir))
(command "fillet" "P" ent1)
(setq pt1 (mapcar '+ pt (list (+ cov stir (/ botr)) (+ cov stir (/ botr 2.0)) 0.0)))
(setq pt2 (mapcar '+ pt (list (- wid (+ cov stir (/ botr 2.0))) (+ cov stir (/ botr 2.0)) 0.0)))
(setq pt3 (mapcar '+ pt (list (- wid (+ cov stir (/ botr 2.0))) (- ht (+ cov stir (/ topr 2.0))) 0.0)))
(setq pt4 (mapcar '+ pt (list (+ cov stir (/ botr 2.0)) (- ht (+ cov stir (/ topr 2.0))) 0.0)))

(setq d1 (/ (distance pt1 pt2) (- botnum 1)))
(ah:chklay "REINF" 4)
(command "donut" 0.01 botr pt1 "")
(command "donut" 0.01 botr pt2 "")
(setq pt5 pt1 ang (angle pt1 pt2))
(repeat (- botnum 2)
(setq pt5 (polar pt5 ang d1))
(command "donut" 0.01 botr pt5 "")
)

(princ)
)


(re

(princ)
)

 

image.png.e56858e7121b48373ec2510d9791a047.pngMulti GETVALS.lsp

Edited by BIGAL
Link to comment
Share on other sites

On 4/19/2024 at 8:02 PM, socacidan said:

Hello everyone,

 

Is possible to help me with an ideea ? 

I have some arraypath that i would like to have drawn without last element in the row visible... either visible or deleted would be fine.

 

Cant make array path shorter cause i need it to reach a bit far from last item. 

 

I made array with "divide" method so not by "measure"

 

Thank you for your time. 

DanPATH1.thumb.png.ac5f27bcbdf7a298c737e850e50d4499.pngPATH2.thumb.png.3ebf2a58f1d0b2f808aeabddd2933154.png

 

And I found a solution actually verry simple... i just press Ctrl + item i would like to delete from array and erase it.. 

Ty for all your replyes

Link to comment
Share on other sites

15 hours ago, BIGAL said:

Ok 1st comment now we have a dwg I would go back a couple of steps and draw the reinforced concrete shape, if this shape is always a rectnag then can be done with a custom dcl for input. If a concrete beam top and bottom reo can be different. 

 

The step would be outside len, wid

Cover, stirrup dia,

top reo dia & number

Bot reo dia & number

Left & right reo, dia & number

 

Your units are mm so why is shape 60 and not say true size 600mm. That is how I would draw it and matches input. 

 

Not sure what the dashed red circles are, yes I am a civil engineer. The circle conflicts with the stirrup ??

 

 Need to clean this up a bit. 

 

 

let me know what you think about this.

image.png

the detail I was trying to generate is a cross-section for a concrete column. 

blue donuts are the rebars in column

the red onew are waiting rebars in the lower area... and i needed them to be placed near the blue dots cause when im generating details i am counting those also no matter where section trough kolom is imagined. 

I thik a lisp could work for a array routine but i dont know how to make one, or if possible to have a lisp that generates a different number for horizontall bars from the vertical bars.. 

And for DCL i didn use any custom so far, cause i dont know how to generate them... usually i make blocks and a lot of elements that i select trough method of visibility... I know very rudimentar :) 

ill try DCL you recomended and see if helps me

 

ty very much

Link to comment
Share on other sites

On 4/20/2024 at 1:38 PM, Steven P said:

BIgAl, not sure this works (weekend and all that, CAD is (mostly) off to test), create array, delete entlast ? if the last item created is always the end of the array, lower right corner in the above examples (which is what I'd need to check)?

I tried to delete entlast.. but the array is working weird.. also with the method CTRL+item i needed to delete is not working, cause if i have an array of 3 items for example and delete last one is oke, but when i need 5 items on the array it delete the 3rd one :)  so basically i deleted then first one in the row and this way works. I can stretch , rotate or mirror it and still keeps first one deleted. 

 

Link to comment
Share on other sites

Did you try the code I posted make sure you appload Multi Radio Buttons 1st. If saved in a support path will auto load.

Link to comment
Share on other sites

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...