Jump to content

Ryan McCuaig

Member
  • Content Count

    44
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Ryan McCuaig

  • Rank
    Greenhorn

Personal Information

  • Occupation
    Architect, Programmer
  • Homepage
    ryanmccuaig.net
  • Location
    Canada

Recent Profile Visitors

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

  1. 🤦‍♂️ ... 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).
  2. 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.
  3. 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)
  4. 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
  5. 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.
  6. 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)
  7. 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.
  8. 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."
  9. 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`.
  10. 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
  11. @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.
  12. 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.
  13. 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).
  14. Holy moly. These are great, Raymond. Thanks for putting in the work.
  15. 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).

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...