mousho Posted August 2, 2022 Share Posted August 2, 2022 Hi friends i made a table by lisp and need the last column to be equation in the lisp himself what i need to do somthing like "=b3*c3" count bars .lsp Quote Link to comment Share on other sites More sharing options...
TemporaryCAD Posted August 2, 2022 Share Posted August 2, 2022 While I can't say for your specific table, I'd approach this in the following way: 1. Loop through the table, using the rowcount (vla-get-rows table) as an index 2. Access data in hardcoded columns (vla-gettext table row column) with the index representing the row. 3. Iterate the index every iteration. So you would end up with something like: (setq size (vla-get-rows table) j 0 ) (repeat size (vla-settext table j 2 (* (read(vla-gettext table j 0)) (read(vla-gettext table j 1)))) (setq j (+ j 1)) ) This will likely not work with your table but the process should be about the same. Quote Link to comment Share on other sites More sharing options...
mousho Posted August 3, 2022 Author Share Posted August 3, 2022 thx i try the process but the resault is fixed and not linked to the cell Quote Link to comment Share on other sites More sharing options...
mousho Posted August 3, 2022 Author Share Posted August 3, 2022 (edited) hi friends i find a way the sulotion is Quote (vla-settext myTable row 5 "=B3*C3*PI*D3*D3*0.25*E3*7.86*0.001*0.01") Edited August 3, 2022 by mousho Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 4, 2022 Share Posted August 4, 2022 Have a look inside getexcel.lsp it has a row column (2 3) = "B3" defun, by Gile. So could create your string. 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.