afrazawan Posted September 22, 2014 Share Posted September 22, 2014 if i will change insertion point in mid of block so block edge will not come on curve / line plz help barrier.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 23, 2014 Share Posted September 23, 2014 I have almost what you want it draws a block along a pline its in VBA what you do is take the start or end and attach it to the arc you then use intersectwith to work out other end point and rotate block. You can also use a chord length calc and the angle of the tangent points to work out the statrt and end points. I do not have start with the mid pt of block for any arc. Sure some one will post. Bit odd same question http://www.cadtutor.net/forum/showthread.php?87387-hi-all-i-want-align-block-with-curve Quote Link to comment Share on other sites More sharing options...
afrazawan Posted September 23, 2014 Author Share Posted September 23, 2014 Im sorry I cant understand can you do it for me with this attached file and possible provide me vedio link thanks Quote Link to comment Share on other sites More sharing options...
hoss Posted September 23, 2014 Share Posted September 23, 2014 If you are not familiar on how to use lisp you can use the following method Use "Measure" select the curve, then type "B" for block and enter the name of your block (in your case br2) type "Y" for yes to align the block and specify the length of segments (which will be block length + distance between) hope this will help you or Use divide if you know how many block you need on the curve Quote Link to comment Share on other sites More sharing options...
afrazawan Posted September 23, 2014 Author Share Posted September 23, 2014 Problem still not solved Cant understand If I use Measure " command then should be a block reference point eg. mid or side any one but suppose my block ref. point is mid of block ME command will align my block on curve with this point. plz I can use LISP but there is no any Lisp.plz look at my attached dwg. Quote Link to comment Share on other sites More sharing options...
afrazawan Posted September 23, 2014 Author Share Posted September 23, 2014 I use this LISP command but Unfortunately this command is not helpfull we can place block on curve with one side alignment how to arrange Side B on curve plz? Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 23, 2014 Share Posted September 23, 2014 You have a block. You have a curve. You want multiple instances of the block positioned on the curve separated by a distance of 0.02. Sounds like a job for the Array command using the Path option (hint: Items). No lisp required. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 24, 2014 Share Posted September 24, 2014 (edited) Try this but your block in the dwg is scaled why did you do that ? Also this is not quite right you will need a block with the insert pt at mid on left side. ; this will draw a single block as you requested ; this is just the start ; rad is length of block (setq rad 4.02) (setq pickobj (entsel "\nPick arc :")) (setq obj1 (vlax-ename->vla-object (car pickobj))) (setq pt (cadr pickobj)) (command "circle" pt rad) ; rad is your block length (setq pickobj1 (entlast)) (setq obj2 (vlax-ename->vla-object (car pickobj1))) (setq intpt1 (vlax-invoke obj2 'intersectWith obj1 acExtendThisEntity)) (setq pt (list (nth 0 intpt1)(nth 1 intpt1))) (setq pt2 (list (nth 3 intpt1)(nth 4 intpt1))) (command "erase "L" "") ; dummy circle (setq ang (angle pt pt2)) (command "-insert" "br2" pt 1 "" ang) Edited September 30, 2014 by BIGAL scaled + rad added Quote Link to comment Share on other sites More sharing options...
ReMark Posted September 24, 2014 Share Posted September 24, 2014 Proof it can be done using the ARRAY command. I also used the PATH, ALIGN and ITEMS options. BTW...if you use a distance of 4.02 between items along the path the actual measured distance between midpoints of rectangles turns out to be .0197 which some may consider close enough for government work. If it really needs to be .02 then use a distance of 4.0203 (see, I figured it out for you). As you can see by the last image there will be a much smaller gap at the top and a much larger gap at the bottom. Quote Link to comment Share on other sites More sharing options...
afrazawan Posted September 29, 2014 Author Share Posted September 29, 2014 how to use this code please Quote Link to comment Share on other sites More sharing options...
afrazawan Posted September 29, 2014 Author Share Posted September 29, 2014 how to use this code please need more help Try this but your block in the dwg is scaled why did you do that ? Also this is not quite right you will need a block with the insert pt at mid on left side. ; this will draw a single block as you requested ; this is just the start (setq pickobj (entsel "\nPick arc :")) (setq obj1 (vlax-ename->vla-object (car pickobj))) (setq pt (cadr pickobj)) (command "circle" pt rad) ; rad is your block length (setq pickobj1 (entlast)) (setq obj2 (vlax-ename->vla-object (car pickobj1))) (setq intpt1 (vlax-invoke obj2 'intersectWith obj1 acExtendThisEntity)) (setq pt (list (nth 0 intpt1)(nth 1 intpt1))) (setq pt2 (list (nth 3 intpt1)(nth 4 intpt1))) (command "erase "L" "") ; dummy circle (setq ang (angle pt pt2)) (command "-insert" "br2" pt 1 "" ang) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 30, 2014 Share Posted September 30, 2014 Copy and paste code to notepad save as say "blockonline.lsp" then appload pick blockonline.lsp I have changed the code a little bit. Quote Link to comment Share on other sites More sharing options...
afrazawan Posted October 12, 2014 Author Share Posted October 12, 2014 Please help me how to use array i'm not much familiar with this command. Proof it can be done using the ARRAY command. I also used the PATH, ALIGN and ITEMS options. [ATTACH=CONFIG]51047[/ATTACH] [ATTACH=CONFIG]51048[/ATTACH] [ATTACH=CONFIG]51049[/ATTACH] BTW...if you use a distance of 4.02 between items along the path the actual measured distance between midpoints of rectangles turns out to be .0197 which some may consider close enough for government work. If it really needs to be .02 then use a distance of 4.0203 (see, I figured it out for you). As you can see by the last image there will be a much smaller gap at the top and a much larger gap at the bottom. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 12, 2014 Share Posted October 12, 2014 Array objects along a path curve in AutoCAD. Search on this topic. There is a video tutorial by cadalystvideos that explains how the command/option works. To make things easier, I located my block at the beginning of the curve using the ALIGN command for the best results. Then use the distance between Items I previously posted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.