Mihail Posted November 17, 2022 Posted November 17, 2022 8 hours ago, BIGAL said: When you do the -insert should also do the add attributes no need to insert then add attributes. If you use (vla-insertblock sp (vlax-3D-point p) n 1.0 1.0 1.0 0.0) then you need to add attributes again though I would use VLA-put function to fill in attributes. Your example has 1 insert but you refer to a csv file does this mean multi blocks to be inserted in 1 dwg ? Post a csv and dwg sample. Firstly thank you for being so helpful! Appreciate This is how it works now. I have a command which does the titleblock and inserts the revision block with few tags prepopulated and at the end of the project I batte tag values to fill the missing tag values of the rev block. I also do the same procedure for titleblock. My issue is I actually have to batch too many times (3-4 times/ project phase) and want somehow to do this at once or at least to reduce the no of batches. Main issue is that 2 of the values are constantly changing. Date and the checker. This is the reason why I use a csv.And I cannot change the format of the block because it is used by a titlesheet generator. The second issue is the CSV at this point it is not overwriting the previous file. I did than on purpose to avoid confusion and mistakes. It is generated for each revision in part so the name and location is constantly changing. I know cad has the possibility to run excel macros but I'm not there yet with the knowledge to actually ask excel through a lisp to execute the macro and pick up the csv by itself. Maybe later down the journey. xxx-1_RA_Field Walk Meeting_08-Nov-2022.csv xxx.dwg Quote
Lee Mac Posted May 2, 2023 Author Posted May 2, 2023 After a significant amount of work undertaken on & off over the last few months, I'm finally ready to release V1.5 of this program - I have updated the first post of this thread with the new version, or you may download it from my site here. New features include: Incrementing by layout (in addition to by drawing) Referencing existing values (facilitating easy batch prefixing/suffixing of attribute values) Control over the drawing process order I have also addressed many of the bugs which had been reported in the years since the last version was released. 2 Quote
ronjonp Posted May 3, 2023 Posted May 3, 2023 2 hours ago, Lee Mac said: After a significant amount of work undertaken on & off over the last few months, I'm finally ready to release V1.5 of this program - I have updated the first post of this thread with the new version, or you may download it from my site here. New features include: Incrementing by layout (in addition to by drawing) Referencing existing values (facilitating easy batch prefixing/suffixing of attribute values) Control over the drawing process order I have also addressed many of the bugs which had been reported in the years since the last version was released. That's quite impressive 1 Quote
BenSale Posted July 12, 2023 Posted July 12, 2023 On 3/13/2012 at 1:38 PM, Lee Mac said: Thanks SLW, I look forward to your feedback! Thanks for what you have provided. so appreciated! I have a set of drawings in AutoCad Electrical all with smart blocks and I need to convert all of them to MicroStation. In this case I am thinking to Burst them then convert them to DGN MicroStation, but all hidden attributes become visible after burst and I don't want to have them in client's drawings and no time to remove them one by one. So I taught to remove all hidden attributes first then burst them all and of course I need to do it globally in a drawing or for all drawings in the project at the same time. So how can I do this? any other solution? Thanks for your help. Quote
BIGAL Posted July 13, 2023 Posted July 13, 2023 How much do you know about lisp ? You can get each block then get the attributes, looping through the attributes you can check if visible is turned off and set the text value to say "" ie nothing or say "." or " ". Very little testing look for the "." (defun c:wow ( / ss obj att atts ) (vl-load-com) (setq ss (ssget "X" '((0 . "INSERT")))) (if (= ss nil) (alert "no blocks found") (progn (Repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1))))) (setq atts (vlax-invoke obj 'Getattributes)) (if (= atts nil) (princ) (foreach att atts (setq vis (vlax-get att 'Invisible)) (if (= vis -1) (progn (vla-put-textstring att ".") (vla-put-invisible att 0) ) ) ) ) ) ) ) (princ) ) (c:wow) Quote
nolex Posted October 16, 2023 Posted October 16, 2023 I always come across error when I run this batch attribute editor lisp on multiple drawings. See screenshot. Quote
Lee Mac Posted October 16, 2023 Author Posted October 16, 2023 Are you running the latest version (V1.5)? 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.