Jump to content

Ryan McCuaig

Member
  • Content Count

    41
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Ryan McCuaig

  • Rank
    Greenhorn

Personal Information

  • Occupation
    Architect, Programmer
  • Homepage
    ryanmccuaig.net
  • Location
    Vancouver BC

Recent Profile Visitors

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

  1. 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
  2. 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.
  3. 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)
  4. 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.
  5. 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."
  6. 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`.
  7. 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
  8. @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.
  9. 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.
  10. 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).
  11. Holy moly. These are great, Raymond. Thanks for putting in the work.
  12. 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).
  13. 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.
  14. Thanks! I'd been staring at that thing so long it just turned into wallpaper. I forgot that it actually did something.
  15. 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.

 

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...