Jump to content


  • Posts

  • Joined

  • Last visited


1 Neutral

Personal Information

  • Location
    United States

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for this. It is returning 10, so looks like LNewObj is pointing to a text object.
  2. Hi all. I'm trying to link some text in a symbol to a field of a record format. I've double-triple checked that I have the names of the record format and field correct, but I don't end up with linked fields. I have over 100 fields to link, which is why I'm trying to automate this process. Here's a snippet of the script that's tripping me up: vs.BeginSym("Console Routing") # some other code # for chan in range(64): vs.CreateText(f'input {str(chan + 1)}') vs.LinkText(vs.LNewObj(), "ConsoleRoute", f'Input{chan + 1}') vs.EndSym()
  3. @JBenghiat funny, I had actually wondered if I could just drop a shortcut in there; don't know why I didn't try it. Thanks!
  4. By resource files, I just mean VW files in the user library that I use to import symbols, worksheets and record formats. I had thought about using a work group, but when importing resources, for example, I need to use vs.GetFolderPath(-13) to get to my user libraries. Not only is importing from a workgroup a more arduous task, but it will break portability to any other machine, as it's all meant to be installed in the user folder.
  5. Hi all, I've been using the GitHub desktop app, and I'm wondering how best to utilize this with some plugins that I'm developing. I would like to avoid copying files from the user library folder into a separate folder just for commits, but with both plugin scripts and resource files, I can't target a single folder. For some of the scripts, I could just set the environment path to the GitHub folder, but that doesn't cover my resource files, or the .vsm's and .vso's Curious if anyone else is using the GitHub client, and what is your workflow like?
  6. @C. Andrew Dunning Ooof, I have not updated that in a while. Yeah, this is using VW 2021
  7. I'm showing distances between speakers created with the speaker tool in a view port with the dimension tool. Once I create a dimension, half the speakers just disappear. I have to change some parameter that will re-create the autohybrid in order for a speaker to reappear. I tried updating the viewport, and that does not help.
  8. Caught that mistake literally 5 minutes after I posted this, where's the delete button? lol
  9. I'm using the following code to import record formats into a file: recordsList, numRecords = vs.BuildResourceListN(47, full_path) #full_path defined earlier for record in range(recordsList): vs.CreateText(vs.GetNameFromResourceList(recordsList, record + 1)) vs.ImportResourceToCurrentFile(recordsList, record + 1) The first time this is run inside a new Vectorworks document there are 2 record formats missing. I have to run the script again for it to work properly. What's really weird is that the CreateText() call, which I've used to check what's actually in the list, doesn't print out all of the records that are imported; so it looks like there are records missing from the list are still imported, which makes no sense to me. I've also tried every version of BuildResourceList with the same results.
  10. @tbexon Yes, I tried locating the file in the plugins folder and moving it from there, and everything works. That link I posted actually mentions this, but I wasn't reading closely enough. Thank you!
  11. I see, I totally just compressed it wrong. It's running now, but I'm having loads of trouble getting to the directory that the actual file is in. I've tried os.getcwd() and os.path.dirname(sys.argv[0]), but both of those return the directory of the process (different from when I run the script standalone). I need a way to locate the resource file no matter where a user saves the downloaded zip. I might have more luck programming at a more reasonable hour, but if you know a magic line of code that achieves this, I'd love to hear it.
  12. Hi All, I'm trying to implement a simple installation script that will copy a resource file into the user libraries folder. I tested it outside of Vectorworks and it successfully copied and pasted the file into the proper folder, but when I try to pair it with installation nothing happens. It actually appears that script isn't running at all. I altered it so it would throw an error, and nothing happened, then I tried to use it to create some text, and still nothing. It's sitting at the same directory level as the folder holding all of the plugins, which appears to be correct according to this page: https://developer.vectorworks.net/index.php/VS:Implementing_Installation_Script Anyone know what I might be missing?
  13. Thanks for the clarification! I'll have to take a look again.
  14. Thanks for this! I finally got it working. GetNameFromResourceList, and variations on that, will return empty strings/handles if called before ImportResourceToCurrentFile. In my case that's no big deal, because I intend to import all of the symbols anyway. It's also worth noting that the resource list starts its indices at 1.
  15. Hi all, I have some plugin objects that I would like to use predefined symbols instead of drawing their geometry for each instance, but I'm having a lot of trouble figuring out how to import a symbol from a user library. It looks like the functions under "Document List Handling" might hold the key, but I can't make any sense out of them. Is what I'm trying to do possible? What would a basic script for this look like? Thanks!
  • Create New...