Jump to content

Scott Stanelle

  • Posts

  • Joined

  • Last visited


0 Neutral

Personal Information

  • Location
    United States
  1. Hi JBenghiat, Thanks for the quick response. I have tried calling the vs.ResetObject() on the symbol definition before without any success. I tried again just now to confirm. Maybe if you have a few minutes next week, you could take a look at my test script. I'm curious if I am even traversing the object correctly or if there might be a better way to do the traversal. Thanks for any help, Scott
  2. Hi JBenghiat, After a long hiatus, I am finally getting back to this. To answer your question of how I am traversing objects, I have a symbol definition consisting of symbols from a resource folder. So rather than replacing a symbol in my drawing, I am actually trying to replace a symbol in a symbol definition. For my current purposes, I am ignoring the actual replacement of the symbol and reduced the task to simply removing the symbol of a given name from anywhere that it occurs in the symbol definition. Once this is done, I attempt to delete the symbol from my resources folder and receive the message that it is still referenced (even though I don't believe it is). I am attaching my code to hopefully make clearer my traversal method. My symbol definition can contain both symbols and groups of symbols. The reason I wrote this script in the first place is because the team I'm writing the script for doesn't want to necessarily replace a symbol in every symbol definition that references it. So I allow them to select the symbol definitions where they wish to replace the symbol. It is in the fringe case where they do replace the symbol in all the symbol definitions that reference it where they encounter the warning message. Obviously in this case, they could use the built in VW Delete/Replace function, but it seems they want to access this function from a single place. I'm ready to tell them to just live with it! 🙂 Best, Scott Delete Symbol.txt
  3. Hi, I have a python script the uses the vs.SetHDef() procedure to replace a referenced symbol's definition with a new definition. This works perfectly. All the symbols using the old symbol definition are now referencing the new symbol definition. The only minor annoyance is that if I attempt to delete the old, unused, symbol definition from the resources folder, Vectorworks still thinks the symbol definition is referenced and asks me if I want to delete the symbol definition completely. Since I know for sure that it is not referenced, I go ahead and delete it. But I was wondering if there is some other python script procedure that I need to call to perhaps clean up old defunct references to the old symbol definition? Interestingly, if I manually replace the symbol without invoking the script, I do not get the dialog prompt asking if I want to delete completely. Thanks, Scott
  4. JBenghiat and Pat Stanford, thank you both for your responses! Yes, I was asking about resource folders in a single VW file. I think I will follow the suggestion to have a separate file for each resource folder. That will make what I need to do easy and straightforward.
  5. JBenghiat, How would I specifiy a subfolder using BuildResourceList. Say, I have the following structure. How do I get just the symbol definitions in the Sign_Images subfolder? Thanks, Scott Master Symbols --> Data Tags Graphics Resources Sign_Images Symbol_Captions Symbol_Images Signs Symbols
  • Create New...