Jump to content

Renaming attributes tags according to a "master" drawing.


liormic

Recommended Posts

Hi,

I'm looking for a lisp to help me rename tags in a drawing according to another drawing.

The values in the attributes should remain the same and it involves many different blocks so it can't be done manually.

Thanks.

Link to comment
Share on other sites

Thanks but it doesn't work.

After selecting the blocks I get "Automation Error. No database" and it returns to the command prompt.

I also didn't understand where exactly do I write the new tag name.

Link to comment
Share on other sites

Thanks but it doesn't work.

After selecting the blocks I get "Automation Error. No database" and it returns to the command prompt.

I also didn't understand where exactly do I write the new tag name.

 

My apologies liormic, I just blindly directed you to that particular lisp program. It does work on certain conditions. Perhaps look at the other codes for attributes on Lee Mac's website.

 

LM may have an updated attribute function that deals with TAGS along

If all else fails then we'll write one for you. or better yet,

Link to comment
Share on other sites

It's a great site LM has with many interesting things but I didn't find anything that deals with renaming the tag.

Link to comment
Share on other sites

I see, okay tell us what do you have in mind.

 

rename tags in a drawing according to another drawing.

 

Will it always be that drawing as source? or it differs for one drawing to another?

 

it involves many different blocks so it can't be done manually.

 

Is that the source block or the target?

Link to comment
Share on other sites

The thing is that there's a drawing with a set of blocks and every once in a while I get another drawing with another set of blocks which I have to change the blocks in it so the tags would be the same every time.

The values shouldn't be changed but the blocks's names, tags and layers should.

I can manage changing manually the blocks's name and layers but not the tags.

I think the best would be if it's possible to make some kind of a table with the block's name, layer and attribute's tags from 1 drawing to corraspond to another block's name, layer and attribute's tags from another drawing it would be the best.

Thanks.

Link to comment
Share on other sites

I can manage changing manually the blocks's name and layers but not the tags.

 

The caped crusader can take care of that really. [commnad: Battman]

 

But if you want a lips code. Give me a real time example and we'll wirte a code for that. I still don't get the "Master Drawing" factor though.

 

make some kind of a table with the block's name, layer and attribute's tags from 1 drawing to corraspond to another block's name

 

You may have something there with that idea :thumbsup: . I couldve have sworn i wrote a code similar to that some time ago.

Link to comment
Share on other sites

The Battman does the job but every time I need to go and change each block according to it's tags.

The "master drawing" isn't important. It's just a drawing which has the new blocks. A list of old blocks and tags Vs. new ones should do.

Thanks.

Link to comment
Share on other sites

The "master drawing" isn't important. It's just a drawing which has the new blocks. A list of old blocks and tags Vs. new ones should do.

Thanks.

 

Do you need a lisp routine? or are you telling us that is what you going to do? You can include the list within the lisp routine though [hardcoded], to eliminate the need to open/read an external file.

Link to comment
Share on other sites

I agree, a list mapping the old names to the new would be a lot easier to use. You could even add such as an Excel sheet and read from that / just a text file / hard-coded into your LSP, whatever makes you happy.

 

If you do want to read from the "template" file, then you'd need ObjectDBX to read the blocks from that without opening it, as sample: http://www.lee-mac.com/odbxbase.html

 

Yet even if you do this, you would simply get the new names from the template. Then you'd still need to figure out which old name needs to become which new one. Thus you'd need to ask the user every time, or ... you'd need a list. So you see: the "template" file then becomes useless, since you could simply have the list anyway.

 

What you could do though, is to extract all the new names from the template. Then remove all the items from the list which points to "new" names not existing anymore. Then ask the user for those old names not mapped to a new one. Modify the list and save back to the file for future. That way you can edit the template and have the routine update itself with minimal user input.

Link to comment
Share on other sites

 

Yet even if you do this, you would simply get the new names from the template. Then you'd still need to figure out which old name needs to become which new one. Thus you'd need to ask the user every time, or ... you'd need a list. So you see: the "template" file then becomes useless, since you could simply have the list anyway.

 

...every once in a while I get another drawing with another set of blocks which I have to change the blocks in it so the tags would be the same every time.The values shouldn't be changed but the blocks's names, tags and layers should. ....

 

So it begs the question:

Are those "another set of blocks" have the same name/tags/layers every time you received the files from the source? hard-coded or not that will complicate things if its different everytime.

Edited by pBe
Link to comment
Share on other sites

I need a lisp routine.

I don't know how to write one and I know that learning it will take a long long time to get to being able to write something like that.

So, if possible I would appreciate it a lot.

Thanks.

Link to comment
Share on other sites

I need a lisp routine.

I don't know how to write one and I know that learning it will take a long long time to get to being able to write something like that.

 

Contact me through my site here, I would be happy to provide a quotation to write such an application for you.

Link to comment
Share on other sites

If i were you liormic i'll take him up on his offer, your're in capable hands i tell you .:)

 

BTW: where were you this past few days LM?

Link to comment
Share on other sites

If i were you liormic i'll take him up on his offer, your're in capable hands i tell you .:)

 

Cheers dude.

 

BTW: where were you this past few days LM?

 

Had a break from the programming for a while... why, you miss me? :P

Link to comment
Share on other sites

Had a break from the programming for a while... why, you miss me? :P

 

:lol: We worry about Lee, just keeping tabs is all ;)

 

Cheers

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...