Jump to content
Developer Wiki and Function Reference Links ×

updating symbols


Recommended Posts

I kicking around with a script that will compare existing symbols in a file and add a few new records to that symbol based on comparing them to a new set of symbols that have been developed with the same symbol name.

I need to keep the existing records attached and the information they contain then add the new records if they exist.

I have a few ideas but want to ask the group for opinions before i dive into this project

Thanks in advance,

Jeff Miller

Link to comment

As long as you know the Record names and Field names this should be fairly easy.

If you don't know the names then it will be much harder.

Actually after a quick test, I am not so sure.

If you have a symbol placed in a drawing with a certain set of records attached and then import/replace with a symbol of the same name but that has different attached records, the existing symbol instances to not automatically get those extra records.

I think you will have to rename the existing symbol definition, import the "replacement" definition, loop through each instance of the symbol to attach the correct "new" records and fill them with data (if not the default data), the delete the "replacement" definition and then rename the original definition.

I hope I am wrong and there is an easier way.

Maybe Sam Jones who does a lot more with records than I do can chime in.

Link to comment

Just replacing the symbol will not bring in the new records.

do you think i could get the new records (i know what i am looking for) and add them to the existing symbol passing the default fields associated with the newer symbol. I was hoping to get the new symbol too because with each new revision there is usually something improved with it. this time it is a few new records, but in the future there may be a better symbol too.

Jeff

Link to comment

That actually makes it much easier.

Import the new symbol definition. Get a list of the records that are attached to the definition.

Step through all the instances of the symbol and check if it has all of the records that are attached to the symbol definition are attached to the instance. If not then attach the ones that are not.

Link to comment

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