Jump to content

Modify data type of multiple tags in object data tables


NoamBrand

Recommended Posts

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

Link to comment
Share on other sites

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 by rlx
Link to comment
Share on other sites

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 by BIGAL
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...