jamami Posted Tuesday at 05:49 PM Posted Tuesday at 05:49 PM I am updating a dynamic block using dummy parameters to achieve multiple visibility states, I have got it working at 2m and 3m by manually inputting data but I need to go to 40m and there are 9 visibility states for for each length. I can generate the data in Excel and ideally I want to cut paste this into the property lookup table but this is not possible. I can cut paste into a block property table but not a lookup table and adding 300+ lines manually in 3 separate tables is not practical. The attached image shows one table completed for 2 and 3m lengths. Can this data be scripted ? Quote
BIGAL Posted Tuesday at 11:42 PM Posted Tuesday at 11:42 PM I don;t think you need Excel. You can match a dcl to a dynamic block so you can enter values and then in turn update the block. It is something I have insert block and the dcl is displayed, its global code so works with any dynamic block. Need a dwg with your block and can test. Quote
jamami Posted Wednesday at 06:31 AM Author Posted Wednesday at 06:31 AM Looks interesting but Does this still require manually inputting 309 lines of data in 3 tables , each with multiple columns ! Quote
jamami Posted Wednesday at 07:26 AM Author Posted Wednesday at 07:26 AM If it does require manual input I suspect the default tableay be the quicker method as fairly easy to type and tab down Quote
BIGAL Posted yesterday at 12:01 AM Posted yesterday at 12:01 AM I think we are struggling to see what you want, if you type 1-2-3 as entry its easy to split it apart based on the "-" into 3 variables . Maybe make a movie if you don't want to post the block. Quote
jamami Posted yesterday at 12:52 PM Author Posted yesterday at 12:52 PM Hi This is a pretty complex block attached. All the parts are spaced out at mo while I am getting things working, once done they are all moved in line. We make beams 2,3,4,5&6m lengths. To make up 7m we use 4+3, to make up 8 we use 5+3, 9-5+4, 10-6+4, ....13-6+4+3 etc etc. i have defined the available viz states Issue is we terminate the beam ends in 1 of 3 ways also we run beams lengths upto 50m at times. Only 1 viz state allowed in autocad (although i did see a link containing a block with multiple viz states but i think that involves some pretty high end programming skills), so I have been playing with using dummy parameters. It works well (attached). My issue is that I need to create many many hundreds of lines of data to encompass the full range I am looking for . jam1.dwg Quote
jamami Posted yesterday at 06:15 PM Author Posted yesterday at 06:15 PM Forgot to add I only populated 2m,3m and 14m on the middle drop down to test the movements and visibilities . the other sizes won’t do anything when selected . Quote
BIGAL Posted 21 hours ago Posted 21 hours ago (edited) There has been some other program requests ignoring dynamic for moment that take say 13 and work out the beams to make a 13m length. It looks like your doing that or is that why you want a look up table, so get 1-1-2-3 etc You can normally get at any property in a dynamic block so you could skip the select length and enter a length value then the block would be updated. I can see what your using. So using the great program by Lee-mac Dynamic block.lsp you can set say the correct visibilty. Just a question would you be happy using a row function much easier than trying to do some 50+ visibility states. 50 = 8 x 6m + 1 x 2m length so how would that be done as a look up ? 6-6-6-6-6....... Much easier to just make as a row of 6 plus a 2. Same with setting correct end. Have a look at video. Do windows.mp4 Edited 20 hours ago by BIGAL Quote
BIGAL Posted 19 hours ago Posted 19 hours ago (edited) This hopefully will make a list of sizes needed. Limited testing, it needs a check for odd numbers added but just did it quick. Odd numbers will need one less even number size and two other sizes to make answer. But its a start. Some one may have a program already. Just test with even numbers. I can see a pattern in the answers for values that have 1 as remainder so will think more. Ok found it start at 7 and every + 6, 7 13 19 25 etc. gives a remainder of 1. (defun c:wow ( / len 6s 5s 4s 3s 2s 6d 5d 4d 3d 2d) (setq len (getint "\nEnter length ")) (setq 6s 0 5s 0 4s 0 3s 0 2s 0) (setq 6d (/ len 6)) (if (>= 6d 1) (progn (setq 6s (fix 6d)) (setq diff (- len (* 6s 6))) (if (= diff 1) (progn (setq len (- len (* (- 6s 1) 6))) (setq 6s (- 6s 1)) ) (setq len (- len (* 6s 6))) ) ) ) (setq 5d (/ len 5)) (if (>= 5d 1) (progn (setq 5s (fix 5d)) (setq len (- len (* 5s 5))) ) ) (setq 4d (/ len 4)) (if (>= 4d 1) (progn (setq 4s (fix 4d)) (setq len (- len (* 4s 4))) ) ) (setq 3d (/ len 3)) (if (>= 3d 1) (progn (setq 3s (fix 3d)) (setq len (- len (* 3s 4))) ) ) (setq 2d (/ len 2)) (if (>= 2d 1) (progn (setq 2s (fix 2d)) (setq len (- len (* 2s 4))) ) ) (princ (setq lst (list 6s 5s 4s 3s 2s))) (princ) ) Edited 13 hours 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.