Jump to content

twk

Member
  • Content Count

    606
  • Joined

  • Last visited

Community Reputation

229 Spectacular

5 Followers

About twk

  • Rank
    500 Club

Personal Information

  • Occupation
    Architectural Designer
  • Homepage
    www.cba-design.co.nz
  • Location
    New Zealand

Recent Profile Visitors

2,847 profile views
  1. 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)
  2. 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()
  3. 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
  4. 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))
  5. 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
  6. twk

    Data Tags

    h = Data Tag Object Handle import vs; def GetTaggedObject(h): result = False; num = vs.GetNumAssociations(h); assH = None assKind = None value = None i = 0; while(i < num and result == False): assH, assKind, value = vs.GetAssociation(h, i); if (assKind == 37): result = True; i = i + 1; return result, assH;
  7. twk

    Formatting OIP?

    My python work-in-progress template: def __temp_funcs(self): kObjXPropEditGroup = vs.SetObjPropVS(1, True) # -- Object has non-default "Enter Group" behavior. PIO objects can enter the profile or path group kObjXPropHasLayerScaleDeps = vs.SetObjPropVS(2, True) # -- Object wants to be reset with when its layer scale changes. kObjXPropPreference = vs.SetObjPropVS(4, True) # -- Object Definition Procedure (ODP) handles ParametricPreferencesMessage::kAction event. kObjXPropDirectModeling = vs.SetObjPropVS(5, True) # -- Object Definition Procedure (ODP) handles handles Direct Modeling events. kObjXPropAttributeTool = vs.SetObjPropVS(6, True) # -- Object Definition Procedure (ODP) handles handles Attribute Mapping events. kObjXPropCustomCursorResize = vs.SetObjPropVS(9, True) # -- // // boolean value // // The O kObjXPropDefaultPropertyUI = vs.SetObjPropVS(11, True) # -- // // unsigned char // // The bits in this property describe the UI displayed kObjXPropCustomHideFactor = vs.SetObjPropVS(16, True) # -- The parametric object provides custom scale threshold to be used to hide inner objects kObjXHasCustomWidgetValues = vs.SetObjPropVS(17, True) # -- OnObjectWidgetValueCall::kAction kObjXPropAcceptStates = vs.SetObjPropVS(18, True) # -- The parametric accpets ObjectState::kAction event kObjXPropPreserveContents = vs.SetObjPropVS(20, True) # -- VectorWorks will not delete the contents of the parametric kObjXPropHasContextMenu = vs.SetObjPropVS(21, True) # -- Sends ObjectContextMenuEvent::kAction_Init and ObjectContextMenuEvent::kAction_Event kObjXPropResetBeforeExport = vs.SetObjPropVS(23, True) # -- This plugin will be reset before Print or Export kObjXPropRedSymbolIsStyle = vs.SetObjPropVS(25, True) # -- Red Symbol of this object can be used to drag&drop kObjXPropHasAttrMappingGeom = vs.SetObjPropVS(26, True) # -- Sends ObjectGetSpecificGeometryCall::kAction with message is (OnObjectGetSpecificGeometry*) kObjXPropHasSectionVPGeom = vs.SetObjPropVS(27, True) # -- Sends ObjectGetSpecificGeometryCall::kAction with message is (OnObjectGetSpecificGeometry*) kObjXPropHasLayerElevDeps = vs.SetObjPropVS(28, True) # -- Resets the parametric if the layer elevation changes kObjXPropHasLayerHeightDeps = vs.SetObjPropVS(29, True) # -- Resets the parametric if the layer height changes kObjXPropLeaderLinePtIndex = vs.SetObjPropVS(33, True) # -- Controls whether how and a paremetric will be recognized by the align leader line menu command kObjXPropLabelPtIndex = vs.SetObjPropVS(34, True) # -- Controls whether how and a paremetric will be recognized by the align leader line menu command kObjXPropDataNameDisabled = vs.SetObjPropVS(35, True) # -- Controls whether the name field on the data pane should be disabled kObjXPropDirectionArrow = vs.SetObjPropVS(39, True) # -- Controls whether the direction arrow should be displaied kObjXPropIsSymbolBased = vs.SetObjPropVS(40, True) # -- Controls whether the object is symbol based and to show context menu "Locate Symbol In Resource Browser" kObjXPropTextStyleSupport = vs.SetObjPropVS(42, True) # -- Controls whether parametric objects can use class text style attribute and get Text Style on OIP kObjXPropDontShowZLocation = vs.SetObjPropVS(45, True) # -- When set to true will remove the Z coordinate for the location widget in the OIP for the parametric kObjXPropGetDragEvents = vs.SetObjPropVS(47, True) # -- Controls whether a parametric will recieve Drag events allowing it to draw custom geometry kObjXPropOIPNameHidden = vs.SetObjPropVS(48, True) # -- Controls whether the name field on the OIP should be hidden kObjXSupportsStyles = vs.SetObjPropVS(49, True) # -- Controls whether a parametric type support plug-in styles kObjXPropUseLayerCutPlane = vs.SetObjPropVS(51, True) # -- Controls whether a parametric object supports Layer Cut Plane values. kObjXPropAllowFreeHybrid2DPath = vs.SetObjPropVS(52, True) # -- Controls whether a Hybrid 2D Path parametric can have a path on a different plane than the object kObjXCatalogSupport = vs.SetObjPropVS(63, True) # -- Controls whether a parametric type supports catalogs kObjXPropDontShowTextureWidgets = vs.SetObjPropVS(64, True) # -- When set to true will remove the texture widgets in the Render pane of OIP for the parametric object kObjXPropHidePlanarDropDown = vs.SetObjPropVS(71, True) # -- When set to true will hide planar dropdown for the widget in the OIP for the parametric
  8. twk

    Formatting OIP?

    I have a set one up similar to one Josh had posted somehwere before. Could I have a peak at yours Josh, to compare? Por Favor 😀
  9. twk

    Type 32?

    The parent of an object in the annotation space is the Annotation Group (Type 11=Group), Viewports have multiple components of itself > Eg. https://developer.vectorworks.net/index.php/VS:GetVPGroup To get the Viewport you use GetVPGroupParent (https://developer.vectorworks.net/index.php/VS:GetVPGroupParent). -edit- as to what a Header type is, I don't know. Full type list of objects is in the C++ SDK.
  10. We layer reference in the design layer, then viewport that onto the master/overall layer. Cumbersome I know, but that workflow, works for us.
  11. We use DLVP's as well. The brain wrecking part is when you have to do window and door schedules in this scenario. e.g You have an overall plan (Design Layer) that contains different floor plan types (in this case, in the form of Design Layer Viewports). When it comes to scheduling doors/windows, if these are in the DLVP's, then your schedule would have to calculate what viewport types are on that overall plan, and then calculate what window types belong to that particular plan type. A simple terrace housing complex is ok. Up scale that to a six story complex with 8 plan types mixed in at each level, and your in a living nightmare. We've alleviated that particular scenario through custom scripting, but if the new Unit Plan methodology would be able to cater for this that would be great.
  12. I wonder if Unit Plans means having say, apartment 'types' in an Apartment complex project. Maybe a mix between symbol functionality and viewport functionalities? Think 'Plugin Styles' but for floor plans? Who knows, the terminology is very vague. The renovation phasing feature in Archicad seems promising though.
  13. 1. 3D Structural Grid.. YES! 2. Materials - sounds good in demo vid and concept, but will wait for release to believe it! Ha! 3. Type Legends - couldn't come soon enough.. but she did use a keyword "in the future", so maybe not next release..

 

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