Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

234 Spectacular


About twk

  • Rank
    500 Club

Personal Information

  • Occupation
    Architectural Designer
  • Homepage
  • Location
    New Zealand

Recent Profile Visitors

2,940 profile views
  1. Possibly the level of error checking in Visual Studio? I use PyCharm and have not much experience in VS. Pycharm recommends the h is not None flavor. Using the h != None, displays a warning to adjust my code.
  2. Ahh yes, that would be me, I forgot I had even signed up as a contributor.
  3. @_c_ this is nothing short of amazing. Truly, thank you for reviving this! Happy New Year from the southern hemisphere!
  4. Interesting, crashes on me every time, even as a standalone script as you've shown. Are you on Mac? It must be a Windows specific thing.
  5. Yep, all simple strings in my testing, I shall submit a bug. Do you use ListBrowsers in your plugins @JBenghiat? Have you ported to 2021 yet? All my plugins work and the only ones crashing were the ones with this function in them. Commenting it out solved the issue, but there wasn't anyother way for me to get a proper width value for setting column widths from text strings. I've had to resort to hard coding guessed string lengths for now.
  6. vs.GetLBHeaderTextWidth(className, allowForSortIcon) The function above is crashing my VW 2021. Anyone else can confirm before I try a reinstall/bug submission? It gets pixel width for specified string (param:className for some reason??) for use with Dialog ListBrowsers.. Cheers, Tui
  7. twk

    2021 Public Roadmap

    @M5d, very well collated a very good read. Gotta love company politics 😅 I personally don't have a dog in this fight, as I use Lumion, however it was very telling when the EpicGames roadmap was released and no vectorworks integration was even mentioned.
  8. twk

    2021 Public Roadmap

    I thought that sentence was going to end better.. Ha!. On topic though, these are much welcomed discussions by VW. Even though I agree, the Architecture tools that are under research need to be released as soon as, I am happy to know VW is listening and providing users an opportunity to have a look at the drawing board and hopefully assist in steering development that benefits us all.
  9. I understand normal hotmail accounts have free one drive storage. So you would sign into onedrive on your PC/Mac with your free account and sync as needed. Similar to dropbox I believe. We are on office365 here, but I know others with free accounts we can send links to and have folders sync'd between us
  10. No expert, but doesn't each VW object have a UUID? Could maybe the data tags that tag the external ref objects, store these? Watching this thread fervently, as data tagging of DLVP and ref DLVP objects is much needed in our practice as well. (eg, doing apartments/real estate development, you have floor plan types via DLVPs)
  11. fixed/tweaked your code: (minor errors in GetLBEventInfo call) import vs kLB001 = 4 kPB_Expand = 5 kPB_Collapse = 6 import vs def dialogHandler(item, data): if item == 12255: nCol = vs.InsertLBColumn(dialID, kLB001, 0, 'Item', 150) bResult = vs.SetLBControlType(dialID, kLB001, 0, 1) bResult = vs.SetLBItemDisplayType(dialID, kLB001, 0, 3) # Some Lines to fill the listbrowser nItem = vs.InsertLBItem(dialID, kLB001, 0, '2D-Axis') nItem = vs.InsertLBItem(dialID, kLB001, 1, '2D-Cap') nItem = vs.InsertLBItem(dialID, kLB001, 2, '2D-Housing-Back') nItem = vs.InsertLBItem(dialID, kLB001, 3, '2D-Housing-Frame') nItem = vs.InsertLBItem(dialID, kLB001, 4, '2D-Housing-Glass') nItem = vs.InsertLBItem(dialID, kLB001, 5, '2D-Leaf-Back') nItem = vs.InsertLBItem(dialID, kLB001, 6, '2D-Leaf-Frame') nItem = vs.InsertLBItem(dialID, kLB001, 7, '2D-Leaf-Glass') nItem = vs.InsertLBItem(dialID, kLB001, 8, '3D-Axis') nItem = vs.InsertLBItem(dialID, kLB001, 9, '3D-Cap') nItem = vs.InsertLBItem(dialID, kLB001, 10, '3D-Housing-Frame') nItem = vs.InsertLBItem(dialID, kLB001, 11, '3D-Housing-Glass') nItem = vs.InsertLBItem(dialID, kLB001, 12, '3D-Leaf-Frame') nItem = vs.InsertLBItem(dialID, kLB001, 13, '3D-Leaf-Glass') vs.EnableLBSorting(dialID, kLB001, False) vs.SetLBHierDispColumn(dialID, kLB001, 0) vs.EnableLBHierDisplay(dialID, kLB001, True) global numLBItems # has to be a global, otherwise it won't work... numLBItems = vs.GetNumLBItems(dialID, kLB001) elif item == kLB001: LBrecursive = True bResult, LBeventType, LBrowIndex, LBcolumIndex = vs.GetLBEventInfo(dialID, kLB001) if vs.HierLBItemIsClosed(dialID, kLB001, LBrowIndex): numbRedisplItems = vs.HierLBItemOpened(dialID, kLB001, LBrowIndex, False) else: vs.HierLBItemClosed(dialID, kLB001, LBrowIndex, False) elif item == kPB_Expand: for i in range(numLBItems): if vs.HierLBItemIsClosed(dialID, kLB001, i): numbRedisplItems = vs.HierLBItemOpened(dialID, kLB001, i, True) elif item == kPB_Collapse: for i in range(numLBItems): if vs.HierLBItemIsClosed(dialID, kLB001, i) == False: vs.HierLBItemClosed(dialID, kLB001, i, True) def rundialog(): global dialID dialID = vs.CreateResizableLayout('Test Listbrowser', True, 'OK', 'Cancel', False, False) vs.CreateLB(dialID, kLB001, 60, 20) vs.CreatePushButton(dialID, kPB_Expand, 'Expand') vs.CreatePushButton(dialID, kPB_Collapse, 'Collapse') vs.SetFirstLayoutItem(dialID, kLB001) vs.SetRightItem(dialID, kLB001, kPB_Expand, 0, 0) vs.SetBelowItem(dialID, kPB_Expand, kPB_Collapse, 0, 0) if vs.RunLayoutDialog(dialID, dialogHandler) == 1: pass rundialog()
  12. Thank you very much @Gelde-Aart. As usual the Vectorworks Dev Wiki gives minimal assistance on usage. I got it to work without explicitly stating the LBControlType. I was missing the SetLBItemDisplayType call. Also my sequencing was a bit off. You need to call SetLBItemDisplayType before any other Enablings for the Listbrowser. Live and learn, live and learn.. edit Also you need to call "SetLBHierDispColumn" before "EnableLBHierDisplay" for some reason. 🤷‍♀️ Thanks again
  13. As Pat suggested GetSymLoc is the one you're wanting to use for plugin objects. I have no experience with Spotlight, so can't add to what Pat has mentioned apart from converting that into python: h2 = vs.FSActLayer() # Plugin Object h1 = vs.NextObj(vs.FIn3D(h2)) # Symbol With Plugin Object if h1 is None: vs.AlrtDialog('Nil') else: x2, y2 = vs.GetSymLoc(h2) x1, y1 = vs.HCenter(h1) vs.AlrtDialog("Insert Point is : {:.2f}, {:.2f}".format(x2, y2)) vs.AlrtDialog("Symbol Dims : {:.2f}, {:.2f}".format(x2 - x1, y2 - y1)) vs.AlrtDialog("Center of HP is : {:.2f}, {:.2f}".format(x2 + x1, y2 + y1))
  14. Greetings all, Anyone got the vs.SetLBHierDispColumn function to work? I can't seem to get it to display the listbrowser in a hierarchy. Just checking to see if possible/or if i'm doing something wrong before I file a bug report. Cheers Tui


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