Jump to content

Ryan McCuaig

Member
  • Posts

    50
  • Joined

  • Last visited

Everything posted by Ryan McCuaig

  1. I notice the old Customization page at https://web.archive.org/web/20220930131851/https://www.vectorworks.net/support/custom is now just a redirect to the developer wiki at https://developer.vectorworks.net/index.php?title=Main_Page, and it's not at all clear there where to actually get a copy of the SDK archive. I spelunked the old page at the Wayback Machine and took an educated guess that these links would work and they do: https://release.vectorworks.net/latest/Vectorworks/2024-NNA-eng-mac-SDK https://release.vectorworks.net/latest/Vectorworks/2024-NNA-eng-win-SDK I'd love to update the developer wiki. But is the "I agree to the license terms" page still part of that flow, or is it OK to put these two links in place on the wiki?
  2. Right on, thank you. Now that I'm not spacing on the name, I'm finding all the references in the dev wiki. For others and posterity, here's the reference: https://developer.vectorworks.net/index.php/SDK:Debugging_the_Vectorworks_file
  3. Thanks. I'm working on some plug-ins back in 2019 and 2020 ... I had thought it was in the SDK download, but I don't see it (only the Batch Encrypt vwlibrary). I'm not sure I'm following where the VS command would be.
  4. A few years ago, I used a debugging vwlibrary that Vlado had made available. It gave a nested, searchable view of the entire object tree (layers, child elements, etc) within Vectorworks. My memory's not what it once was and I can't find where I downloaded this back then. Can anyone point me in the right direction? Thanks
  5. 🤦‍♂️ ... I had a build step that used `cp -LR` to copy the bundle into a plug-ins folder. I was using `-L` (resolve symlinks) because I didn't understand that `BuildVWR` will symlink when `VWR_MODE="Debug 64"`, which was leading to Xcode producing a bundle that didn't have all the resources, but instead an alias to the .vwr file. (This is the default behaviour in the tester module, if you're compiling debug builds). This `cp` step was breaking Xcode's code signing (ie. none of the string or png resources were present in `MyLib.vwlibrary/.vwlibrary/Contents/_CodeSignature/CodeResources`), so VW freaked out and crashed on startup, presuming malware. (The clue was that manually copying either the tester module library, or my own library, into Plug-Ins made it work).
  6. Hm, the current TesterModule does seem to work without signing / notarization. It must be something testy with having brought this Xcodeproj forward since VW2016. At least I now know it's possible to get SDK plugins in.
  7. So I'm getting that signing and notarizing *are not* required, but I will need to use `csrutil` if I want to debug? I just had a weird situation where VW simply crashed on startup unless I used `codesign` on the binary at `MyLib.vwlibrary/Contents/MacOS/MyLib`. Once that's signed, then VW can proceed but my the debug messages I throw out at registration time aren't showing in console, and I can't see the tools in the Workspace Editor. (Also noticed: the SDK manual still has stuff about .rsrc files in it ... maybe we could figure out a way to document this stuff). macOS 10.15.2 beta, VW 2020 SP2 (513482)
  8. Hi Raymond-- Blerg, this is what I'd feared. Thanks for laying out the approach though. Seems straightforward but a bit more of a nail-biter than I'd like. Yeah, I'm not sure either that record fields even have handles, or at least not any VS can see. Fortunately it's not a PIO record. The records in question are regular user-attached records on drawing tags, as part of a schedule generator. I do use worksheets as part of the implementation, but (also fortunately) the worksheets aren't the source of truth (the tags/records are) and can be automatically re-generated after the record replacement. Ryan
  9. Is there a Vectorscript function to give a new name to a field in an existing record format? I'm really hoping that something with a signature like `FUNCTION SetFldName(recFormatHd : HANDLE; index : INTEGER; newName : STRING) : BOOLEAN;` exists somewhere, notwithstanding it not existing in the docs ... ie. the apparently missing setter half of `GetFldName(recFormatHd : HANDLE; index) : STRING;`. On reflection, I can imagine that this could cause some potential mayhem with existing record instances. But, my ability to rename a field from the UI suggests that it's perfectly do-able, but not exposed to Vectorscript. I'm speculating that that `GetParamName(size_t paramIndex)` hanging off of VWRecordFormat in the SDK's VW foundation classes is what the Vectorscript `GetFldName` is under the hood. But that class has only a `SetParamLocalizedName` ... no `SetParamName` so there doesn't look to be anything I could publish to Vectorscript with an SDK library.
  10. Huh, yep. Crashes for me on Mac/2016 and 2017 too. Sorry. (That's what I get for typing in code off the top of my head). I thought it might have been the call to `vs.Message`, maybe on the hypothesis that dialogs tend to be callback-driven too and the message window is kinda-sorta a dialog, but no. This crashes consistently too: import vs def cb(pt): vs.Locus(pt) vs.GetPt(cb)
  11. Note too that something like this will crash Vectorworks 2016/Mac for me: import vs def main(): vs.GetPt(lambda pt: vs.Message(str(pt))) main() and this will work OK: import vs vs.GetPt(lambda pt: vs.Message(str(pt))) As far as I can tell this is roughly what the line "This cannot be used if there is a function anywhere in the calling chain" from the docs means.
  12. Even better: in Macintosh 2015 it's not a ZIP archive at all, but a folder that the OS treats as a "file" (aka. a bundle). Just right click and select "Show Package Contents."
  13. For the benefit of future searchers, note that these are found in /path/to/Vectorworks/Vectorworks.vwr, which (despite the name) is a ZIP archive. Copy and unzip it, and you'll find all the system images in there at the file paths you'll need to use in the call to `AddListBrowserImage`.
  14. Hi all-- Apologies, this is me coming up for air from the stone ages: When did colour gradients start actually converting to a greyscale when the b/w only setting is applied (either as a doc setting or a viewport setting)? 2013? My former firm had been using gradient fills from/to the same colour to get flat colour fills in presentation elevations. The effect was that you could turn on b/w for the viewport and have all linework drop to black, but the fills stay coloured. As of 2013 this doesn't work anymore. Does anyone have any preferred replacement techniques? Viewport overrides seem finicky, but maybe not terrible given the eyedropper. Thanks Ryan
  15. @Assembly - haha, that's probably because they're the parts that don't actually say much. It's in progress... finally getting back into some SDK work, so I'm hoping I'll get the fourth instalment up soon.
  16. For what it's worth, I put together my writeup of getting ODBC going with MySQL on a Mac, and put together some scripts to get it going. http://ryanmccuaig.net/2012/06/20-vectorworks-mysql-odbc-mac/ In VW2011 at least, linking records to the database seems to have some performance issues, over and above the problems in conceptual clarity. I'm preferring to take it over and work directly with DBSQLExecuteGet et al from Vectorscript.
  17. Looks like the greyed-out bitmap problem is fixed in Mac 2011 SP3. We just encountered it in our office with some SP2 machines not displaying compressed TIFFs. The same TIFF worked fine with machines upgraded to SP3. (I'm now typing the words "gray" and "grayed" for the benefit of any Americans trying to Google this).
  18. Holy moly. These are great, Raymond. Thanks for putting in the work.
  19. James-- If you're looking for free, try TextWrangler (Mac App Store) with the VSS language module: http://www.vectorlab.info/index.php?title=VSS_Language_Module_for_BBedit_%26_TextWrangler This will also work with BBEdit (paid). I tend to use TextMate (http://www.macromates.com) with the Vectorscript language bundle (https://github.com/textmate/vectorscript.tmbundle ... I'm the author of the original bundle, and I shamefully haven't gotten around to stitching in any changes to the official repository since 2007, so email me if you need it).
  20. Ryan McCuaig

    SDK Here I come!

    Mark-- Can't help you with the Windowsy stuff, but here's how I'm getting it: - If you see a GS_Foo(gCBP,...) call, that's deprecated. - New-style calls are gSDK->Foo(...) ... basically a method call on an object that's a big ball of SDK stuff. gSDK is a global instance of the ISDK class that gets defined by the boilerplate in plugin_main(). - The VWFC classes that Vlado has put together wrap up a lot of the side stuff (files, dialogs, folders on disk, etc) into an OO interface. The cpp source for these is in the 2011 sdk distribution (see $SDK_ROOT/SDKLib/VWFC/Sources); you can see that as of VW2011 these are just thin wrappers around old GS_Foo() calls. For what it's worth, I'm writing a basic (Mac) tutorial at http://ryanmccuaig.net right now. May be a month or two before I'm done, but I'm trying to keep it basic.
  21. Thanks! I'd been staring at that thing so long it just turned into wallpaper. I forgot that it actually did something.
  22. I remember a handy feature in AutoCAD: holding down "shift" while clicking on a series of objects stacked directly on top of one another, each click would select the next item down in the stack. Does anyone know if there is a way to do this in Vectorworks? At the moment, I'm just sending to back until I get the line I want. Thanks.
  23. I remember looking into this some years ago with VW 12.5/2008, and having to use CUPS-PDF to create a virtual printer: http://hints.macworld.com/article.php?story=2007082812233971 Much as I'd have loved to use the built-in batch PDF export routines, our regular service bureau uses an older PDF rasterizer. The rasterizer would choke on PDFs produced directly through the Vectorworks embedded PDF framework, but would be OK on ones produced using OS X's built-in PDF generator. Go figure.
  24. Orso-- Thanks for packing that up as a tool. Call me crazy, but by Version 2011 (VW16) it strikes me that this should really be packaged in. -RMc.
×
×
  • Create New...