J. Miller Posted May 6, 2011 Share Posted May 6, 2011 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 Quote Link to comment
Pat Stanford Posted May 6, 2011 Share Posted May 6, 2011 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. Quote Link to comment
J. Miller Posted May 6, 2011 Author Share Posted May 6, 2011 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 Quote Link to comment
Pat Stanford Posted May 7, 2011 Share Posted May 7, 2011 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. Quote Link to comment
J. Miller Posted May 8, 2011 Author Share Posted May 8, 2011 Thanks for the input Pat. I will give this a try Jeff Quote Link to comment
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.