Marcin O Posted March 11 Posted March 11 Hello, does anybody have a "standalone" version of Add Table function by Lee Mac? I've tried to incorporate it to my script but got confused. Probably I'm not sure how to use "spc" variable. Maybe there is a 'stripped' version of function Add Table https://www.lee-mac.com/lisp/html/SumAttributeValuesV1-1.html so it's possible to just paste it into another script? Similar clean function of write CSV is here https://www.lee-mac.com/writecsv.html Thanks for reply. Quote
pkenewell Posted March 11 Posted March 11 (edited) @Marcin O I might help if you explain what your trying to do. In Lee Mac's (lm:addtable) function, the "spc" argument is for a VLA Object that corresponds to the Modelspace or Paperspace of the drawing. Look at where he gets the argument in the main body of the program: (if (= 1 (getvar 'cvport)) (setq spc (vla-get-paperspace (LM:acdoc))) (setq spc (vla-get-modelspace (LM:acdoc))) ) Edited March 11 by pkenewell Quote
Marcin O Posted March 11 Author Posted March 11 Dear @pkenewell I just don't know how to add function Add Table to my script. Variable "SumAttributesByType-CSV-Data" stores the list of lists which is a source data for Add Table script. If You know how to add that function to script I will be very gratefull. Best greetings SumAttributesByTypeAndDetails.dwg SumAttributeByTypeAndDetails.lsp Quote
pkenewell Posted March 11 Posted March 11 (edited) @Marcin O Give This a Try: Look at my (pjk_Addtable) function for reference. It's tailored to your list. Look at the comments to change text heights, Table Style Name, Title, etc. to your preference. EDIT: Updated table to include the Title row on top! SumAttributeByTypeAndDetails.lsp Edited March 11 by pkenewell Quote
Marcin O Posted March 12 Author Posted March 12 Dear @pkenewell, thank You for help, it works like a charm Best greetings M 1 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.