Luís Augusto Posted August 6, 2013 Share Posted August 6, 2013 Hello everybody. The other day I received a lot of help on the topic FieldObjects below. FieldObjects.lsp This routine creates red rectangles around objects using the IdObject. I would like to create the same rectangles in selected dimensions after the routine that adds the total length. This part of the routine uses IdObject to generate a calculated field. From_To test.dwg From_To.lsp part of code used ;;-------------------------------------------------------- ;;http://www.cadtutor.net/forum/showthread.php?80403-Table-editing ;;-------------------------------------------------------- (Defun _Sum () (setvar 'nomutt 0) (princ (strcat "\nSelect the dimensions for the total length:")) (setvar 'nomutt 1) (if (ssget '((0 . "TEXT,MTEXT"))) (progn (setvar 'nomutt 0) (setq FldStr "=%<\\AcExpr \(") (vlax-for obj (setq ss (vla-Get-ActiveSelectionSet doc)) (setq FldStr (strcat FldStr "%<\\AcObjProp Object(%<\\_ObjId " (Get-ObjectID-x86-x64 obj) ">%).TextString>% +"))) (vla-Delete ss) (setq FldStr (strcat (substr FldStr 1 (1- (strlen FldStr))) "\) \\f \"%lu" (itoa Units) "%pr" (itoa Prec) "%ps[," Suff "]\">%")) ) ) (princ) ) It turns out that I did not understand anything about the routine of Master Lee, lack of knowledge on my part. I wonder if someone or the author proposes to adapt part of his masterpiece to my humble routine. That's fantastic to hear, thank you for your kind compliments Luís!I'm delighted that the program will be useful in your work. I have now attached the program to this post for those without access to the Swamp. [ATTACH]42816[/ATTACH] This would be the fastest way to check the progress after the sum. Thank you all. 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.