NoamBrand Posted May 14, 2019 Share Posted May 14, 2019 I have created 40 object data tables with 30 tags in each table (there are 360 unique tag names). The tag types in the object data table are defined by default as string. I have an excel list that specifies the right data type of each tag (int,real,string). A lisp that allows to modify existing tables, going threw all the tables in the DWG would save the tedious process of manually defining 40*30=1200 tags. Attached is a sample file. Help would be highly appreciated! Modify data type of multiple tags in object data table.dwg Quote Link to comment Share on other sites More sharing options...
rlx Posted May 15, 2019 Share Posted May 15, 2019 (edited) wow... " שוחה על קו מים ראשי " , according to google this is Hebrew but I can make head or tails from it , for me it might have come from the movie 'Alien' when I paste this even my cursor starts going in the opposite direction. Also not sure what you need. When you say object data tables you mean 40 blocks with 30 attributes each? And you want to update the blocks with data from excel or write data from the blocks to excel??? I'm not sure if anyone can help unless they can read / have the Hebrew language installed on their pc. Edited May 15, 2019 by rlx Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 16, 2019 Share Posted May 16, 2019 (edited) Ok if we have a block with 30 attributes you do not need to know attribute tag name to change the way forward for you may be when you use 'getattributes it does so in an order as created (get to change order later) so if I had a excel Blockname Att value repeated as 2 columns I could use the fact that I can make row number 62 = block attribute 2 and change it. sample code not tested no cad (while (setq obj (vlax-ename->vla-object (car (entsel "Pick Block with attributes")))) (setq x 1) (foreach att (vlax-invoke obj 'getattributes) (princ (strcat "\n" (rtos x 2 0) " " (vla-get-name obj)" " (vla-get-textstring att))) (setq x (+ x 1)) ) ) Noambrand just to clarify like rlx is it a Autocad table ? Much easier as it works like excel rows and columns. rlx will ask my next door neighbour he can speak Hebrew. Edited May 16, 2019 by BIGAL 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.