- //---------------------------------------------------------------------------------------------------------// MyToggles//--------------------------------------------------------------------------------------------------------- GetExcel : dialog { key = "Title"; label = "";//Title$ from lsp file spacer; : boxed_row { label = "Parameters"; width = 30; height = 4; fixed_width = false; : row { label = "Block Selection" ; fixed_width = false; alignment = left; width = 50 ;: row { alignment = top; height = 1; spacer;}: radio_button { key = "Rad101"; label = "*ALL* Blocks"; alignment = middle; }: button { label = "Pick Blocks>>"; key = "But102"; width = 12; fixed_width = true; alignment = middle; mnemonic = "P"; }: spacer { width= 5.0; height = 1.0;}}: column { alignment = right; fixed_width = true; label = "Excel Options";: column { : spacer { width = 2.0; } }: edit_box { key = "eb1"; alignment = top ; label = "&Starting Row: "; width = 4; fixed_width = true; } : edit_box { key = "eb2"; alignment = top ; label = "&Starting Column:"; width = 4; fixed_width = true; }}}// :spacer {height=1.0;} : boxed_row { width = 50; fixed_width = true; label = "File Options";: row { label = "Excel File Location" ; fixed_width = true; width = 50; spacer;: spacer { width= 5.0; height = 1.0;}: edit_box { key = "Dir" ; edit_width = 55 ; fixed_width = true; edit_limit = 256 ; alignment = left ; } : button { key = "Browse" ; label = "Browse>>" ; mnemonic = "B" ; width = 15 ; alignment = middle ; } } : column { label = "File Status" ; width = 15;: radio_button { key = "Rad102"; label = "Append (Following)"; } : radio_button { key = "Rad103"; label = "New (Leading)"; } }} spacer; ok_cancel;}//MyToggles
Alright now let me explain what I'm attempting to have happen with this app:
So, depending on the users needs they will either be creating an excel file (from a template) if "New" is selected. This will cause the @excel_row variable to start at "1" on cell A8 (8 because of a header, this is editable in the DCL as an edit box field). So, if it's a new excel sheet and they run the program, it will fill out starting at row 8, and go all the way down, counting each line as it does so. This means that the last item will end on a line that is 8 spots further than the "count" (or itemdata as it's called in the code).
So, they've ran it once from "new" and they end up on row 100 showing 92 items, so column A will show "92" (the running count).
This is where the problems come in.
So after they've done a new sheet, now they've opened up the next drawing in cad and are ready to append the excel file with the new dwg attribute information.
They can enter into the DCL the last line used, i.e. the furthest-most-left column, the row counter not the running-total-item-counter that is itemdata.
So as per our example, they enter "100" in the row edit box in the DCl, and execute the routine.
I need it to continue inputting data, starting with line 101 (because it ended on line 100), but it must pick up the running total i.e. 93 will go into row 101...
I hope this accurately and effectively describes the situation and issue i'm having with it.
I've tried a few things and there's nothing that I can think of at this moment that must be a certain way, I'm just trying to get it to work correctly as I described above so please don't think my methodology in the code is how it must be coded....just, looking for code that will do what I need it to do...feel that i'm very close....just having a few issues.
Thanks again Clint!