woodman78 Posted May 2, 2012 Author Posted May 2, 2012 With my own DB i get: ; error: bad argument type: lentityp nil Quote
pBe Posted May 2, 2012 Posted May 2, 2012 With my own DB i get: ; error: bad argument type: lentityp nil My guess is you did NOT capitalize the key values on the DCL file as i suggested. hence the error message ed1 : edit_box { edit_limit = 2; edit_width = 2;} ed2 : edit_box { edit_limit = 3; edit_width = 3;} ed3 : edit_box { edit_limit = 10; edit_width = 9;} ed4 : edit_box { edit_limit = 58; edit_width = 58;} attab12 : dialog { label = "Drawing Title Block"; : boxed_radio_column { label = "Application" ; //give it a label : row { : radio_button { //define radion button key = "rb1" ; //give it a name label = "Apply to Current Layout ONLY" ; //give it a label value = "1" ; //switch it on } : radio_button { //define radion button key = "rb2" ; //give it a name label = "Apply to All Layouts" ; //give it a label } } } : boxed_column { label = "REVision Data" ; //give it a label : row { : column { : text {label = "Lines"; } : radio_button { key = "rbl9" ;label = "Line 9" ; } : radio_button { key = "rbl8" ;label = "Line 8" ; } : radio_button { key = "rbl7" ;label = "Line 7" ; } : radio_button { key = "rbl6" ;label = "Line 6" ; } : radio_button { key = "rbl5" ;label = "Line 5" ; } : radio_button { key = "rbl4" ;label = "Line 4" ; } : radio_button { key = "rbl3" ;label = "Line 3" ; } : radio_button { key = "rbl2" ;label = "Line 2" ; } : radio_button { key = "rbl1" ;label = "Line 1" ;value = "1" ; } } : column { : text {label = "REV"; alignment = centered;} : ed1 { key = "L9-REV"; } : ed1 { key = "L8-REV"; } : ed1 { key = "L7-REV"; } : ed1 { key = "L6-REV"; } : ed1 { key = "L5-REV"; } : ed1 { key = "L4-REV"; } : ed1 { key = "L3-REV"; } : ed1 { key = "L2-REV"; } : ed1 { key = "L1-REV"; } } : column { : text {label = "By"; alignment = centered;} : ed2 { key = "L9-BY" ; } : ed2 { key = "L8-BY" ; } : ed2 { key = "L7-BY" ; } : ed2 { key = "L6-BY" ; } : ed2 { key = "L5-BY" ; } : ed2 { key = "L4-BY" ; } : ed2 { key = "L3-BY" ; } : ed2 { key = "L2-BY" ; } : ed2 { key = "L1-BY" ; } } : column { : text {label = "Date"; alignment = centered;} : ed3 { key = "L9-DATE"; } : ed3 { key = "L8-DATE"; } : ed3 { key = "L7-DATE"; } : ed3 { key = "L6-DATE"; } : ed3 { key = "L5-DATE"; } : ed3 { key = "L4-DATE"; } : ed3 { key = "L3-DATE"; } : ed3 { key = "L2-DATE"; } : ed3 { key = "L1-DATE"; } } : column { : text {label = "Description"; } : ed4 { key = "L9-DESCRIPTION"; } : ed4 { key = "L8-DESCRIPTION"; } : ed4 { key = "L7-DESCRIPTION"; } : ed4 { key = "L6-DESCRIPTION"; } : ed4 { key = "L5-DESCRIPTION"; } : ed4 { key = "L4-DESCRIPTION"; } : ed4 { key = "L3-DESCRIPTION"; } : ed4 { key = "L2-DESCRIPTION"; } : ed4 { key = "L1-DESCRIPTION"; } } } spacer ; } : row { ok_cancel ; //predifined OK/Cancel } } My reason for doing that is to avoid creating too many variables. if you notice on the code i posted you wont see that looooonnnnngg (set_tile ....) (action-tile......) Try it now Quote
woodman78 Posted May 2, 2012 Author Posted May 2, 2012 Yeah that was it pBe. Sorry my bad!! One thing I did notice is that when I select say Line 4 on the dialog and it turns on Line 4, then if I go back into the dialog it has reset the radio button to line 1. Is there a way I can get it to remember the last one chosen??? Apart from that excellent stuff. Quote
pBe Posted May 2, 2012 Posted May 2, 2012 Yeah that was it pBe. Sorry my bad!! One thing I did notice is that when I select say Line 4 on the dialog and it turns on Line 4, then if I go back into the dialog it has reset the radio button to line 1. Is there a way I can get it to remember the last one chosen??? Apart from that excellent stuff. Good for you woodman78, as for "remembering" the last radio_button.. I will give you a chance to figure that one out . within 24 hours . Seriously. i'll have a look at that tommorrow. I'm out of the office and off to LaLa land. Kudos to Lee Mac for those Dynamic Block Functions Quote
Lee Mac Posted May 2, 2012 Posted May 2, 2012 Kudos to Lee Mac for those Dynamic Block Functions Many thanks for your appreciation pBe Looking back over the code and my functions, since the Dynamic Block Visibility Parameter Name will remain unchanged throughout the program execution, it would be more efficient to bind the Visibility Parameter Name returned by my LM:GetVisibilityParameterName function to a local variable, then subsequently use my LM:GetDynamicPropertyValue / LM:SetDynamicPropertyValue functions to set the value of the Visibility Parameter, passing these functions the Visibility Parameter Name variable. The LM:GetVisibilityState and LM:SetVisibilityState both call the LM:GetVisibilityParameterName function with each evaluation and I suppose are more for convenience; though, I doubt the difference in performance is noticeable. Quote
woodman78 Posted May 4, 2012 Author Posted May 4, 2012 Hey pBe, I had a look at trying to get the radio button to remember the last position but I am having trouble understanding your code. I even went back to my original code to see if I could get it to work that way but I was unable to do it. Could you have a look at it? Is the updating of the rev box on all layouts alot more difficult? Quote
pBe Posted May 4, 2012 Posted May 4, 2012 (edited) Hey pBe, I had a look at trying to get the radio button to remember the last position but I am having trouble understanding your code. I even went back to my original code to see if I could get it to work that way but I was unable to do it. Could you have a look at it? (if (not (new_dialog "attab12" dcl_id)) (exit)) [b][color=blue](set_tile (if (null rbd) "rbl1" (strcat "rbl" rbd)) "1")[/color][/b] (mode_tile "rb1" 0)(mode_tile "rb2" 1) .... .... (LM:SetVisibilityState (last Blk) (strcat "Line" [b][color=blue](setq rbd[/color][/b] (itoa (1+ (vl-position "1" (mapcar 'cadr VisState))))[color=blue][b])[/b][/color]) ))) ) ) Is the updating of the rev box on all layouts alot more difficult? Not really woodman78. Tell me the conditions when and when not to update other layouts. Rev-box data on "layout1" Rev By Date Description A Woodman Yesterday Blah blah B pBe Today Blah blah Rev-box data on "layout2" Rev By Date Description A Woodman Yesterday Different B pBe 2 days ago Something else c Woodman 1 Hour ago Blah blah Running the code while on "layout1" Current only *Apply To All .... What will happen then?.... Edited May 4, 2012 by pBe Quote
woodman78 Posted May 4, 2012 Author Posted May 4, 2012 Well pBe, I see it simple that using the radio the user selects when to update all layouts or just the current layout. If they choose to update all then all the info in the other rev boxes will be over written with that in the dialog box. Hope this helps. Quote
pBe Posted May 4, 2012 Posted May 4, 2012 (edited) Well pBe, I see it simple that using the radio the user selects when to update all layouts or just the current layout. If they choose to update all then all the info in the other rev boxes will be over written with that in the dialog box. Hope this helps. Ae you sure? If you are say the greek alphabet backwards... within 10 seconds.... UPDATED CODE Edited May 4, 2012 by pBe Quote
woodman78 Posted May 4, 2012 Author Posted May 4, 2012 Que? I'm lost now. Yeah that's what I want. Thanks. Quote
pBe Posted May 4, 2012 Posted May 4, 2012 (edited) Que? I'm lost now. Yeah that's what I want. Thanks. Dont mind that comment Woodman78 i'm just playing. . Go ahead and try the the updated code. and tell me what you think. Hope everything goes well. UPDATED CODE Edited May 4, 2012 by pBe Quote
woodman78 Posted May 5, 2012 Author Posted May 5, 2012 Thanks pBe. I'll test it and let you know. I appreciate your help. Quote
woodman78 Posted May 6, 2012 Author Posted May 6, 2012 Hi pBe. Now when I run the lisp i get "nil" and that is it? Did I miss something. I got the code from Post #36 and the rev-box. Quote
pBe Posted May 6, 2012 Posted May 6, 2012 Hi pBe. Now when I run the lisp i get "nil" and that is it? Did I miss something. I got the code from Post #36 and the rev-box. Nil is when there's no object Found. Check the block name otherwise change it here ---->> (setq bn "rev-box" Visname "Visibility1") Quote
woodman78 Posted May 6, 2012 Author Posted May 6, 2012 I downloaded the block from your post and it is named "rev-box" and it is the same in the code. Could anything else cause this? Quote
pBe Posted May 7, 2012 Posted May 7, 2012 I downloaded the block from your post and it is named "rev-box" and it is the same in the code. Could anything else cause this? So how did it go? Were you able to find the problem? Quote
woodman78 Posted May 7, 2012 Author Posted May 7, 2012 Hi pBe, I got it sorted. It was a problem with my block. I must have had an old version of it. The lisp works great. Thank you very much for your help. It is a fantastic piece of work. I appreciate all the work you did on it. 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.