pmadhwal7 Posted Saturday at 05:19 PM Posted Saturday at 05:19 PM in autocad i need to place block which was align in x scale i have lisp code too but the isseu is the block is placing wrongly i was place mid chainage of the point where i need to place those block but always it placing wrongly l;ike first length of my block is 12m but the code placing 8m 4 m each side i was attached all the input i have can anyone fix this Drawing2.dwg block.dwg PIPE_PlotBlocksFromCSV.lsp PIPE_Block.csv.xls.csv Book1.xlsx Quote
BIGAL Posted 20 hours ago Posted 20 hours ago (edited) The DWC block has a insertion point at mid point, Still not sure about the wrong length and 4m dist. Can you also provide a dwg with before and after so can see how say first 3 blocks should look. add the excel data as MTEXT etc. Yes can read the Excel direct no need for a CSV. Ok understand in Excel from 250.408 to 250.420 so point is (250.408+250.420)/ 2.0 where label is. So need to establish start chainage of pline 250414 compared to start distance away and get that start point X&Y. Your DWC block appears to be scaled like 10 x times. Why is it not 1 unit long say actual is 0.9447 that fits in 1 unit. The scale for 12 would be just that. Also what is Y scale ? Does the block have a fixed height, Y ? Again edit block 1st. Then can do some code to match. Edited 20 hours ago by BIGAL Quote
pmadhwal7 Posted 18 hours ago Author Posted 18 hours ago @BIGAL actually this is the chainage which means if we 250.408-250.420=12meter so my dwc pipe length is 12m at this point what i do i was calculate mid difference of those chainage and i was place mid chiange in autocad (as seen my dwg u can check)now i run the lisp which place those block like the align command it work so in taht portion dwc length should be 12 meters 6meters from each side of that 250414 but the isse is block length comming 8m instead of 12soemwhere the differnce is 2m somewhere 4 as the y scale is only for width so thats the not issue because i will change it by selecting all one time also i am not able to uderstand what u mean for 'scaled like 10 x timee' is anything wrong in my block? Quote
BIGAL Posted 1 hour ago Posted 1 hour ago (edited) Firstly your block is 9.4 long so, at a scale of 12 its 12x9.4 in length. So 1st step is scale down the block by 0.1 and resave then it is basically 1 unit long so a scale of 12 will be a fraction under a true 12 length. The other question is then what sclae factor to use for the Y value but this can be calculated as a factor of the scale and block height Y so they are all the same height. If you want it to be a true 1 unit can rescale to match that and save block. Hint 1.05843568371114 I don't have a problem working out the length or the insertion point. Those values are in your Excel example. You just need to work out the chainage of the start end of the pline. For me I would just start brand new code easier, will see what I can do and will read the Excel direct. Edited 1 hour ago by BIGAL Quote
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.