Jump to content

twk

Member
  • Posts

    877
  • Joined

  • Last visited

Everything posted by twk

  1. This is very interesting, I've never thought to use the interaction tools like this. Would this mean that we would have to run separate scripts lanuages for either operation? ie (pascal for interaction, python for everything else).
  2. What is this black magic you speak of?
  3. Sorry, I use Windows + PyCharm for remote debugging. Although whenever VW stalls during debugs, I just kill the debugger in Pycharm and it seems to release VW.
  4. You could split your sheet index into multiple database header rows. Eg First Database Header Row's criteria = All Titleblocks AND TitleBlock.SheetName contains "T" -- No Formatting Next Database Header Row's criteria (the one for Civil) = All Titleblocks AND TitleBlock.SheetName contains "C" -- Text Formatting : Italic and so on..
  5. I use Pycharm to develop, which as VCS integration either using Githubg/Bitbucket/etc. I dont use resource files at the moment (I assume you're meaning the vwr pacakges?) Folder structure setup is as below: - Workgroup Folder (Setup/pointed to in the Vectorworks Preferences). Eg (C:\VW Preferences\2022) - Setting this in the Vectorworks Preferences causes vectorworks to setup the required folder structure (that vectorworks uses) for use as a Workgroup folders. Which adds folders such as: Libraries, Plug-ins, Settings, Workspaces, etc. I keep all my plugins (.vso, .vsm, etc) files in the Plug-ins folder, together with my scripts for them. - The plugin development project folder is in the Plug-ins folder, which is what the PyCharm project points to. - This way Pycharm manages the version control for both the script modules and the vectorworks custom plugin files (vso, vsm, vst)
  6. Wow have these replies filled my inbox, have had to turn off notifications for this topic! So things seem a bit clearer since I last read.. 1. Service Select IS NOT THE SAME AS Subscriptions 2. Service Select = Perpetiual License | ie | When you stop service select you get to keep Vectorworks @ whatever version you've stopped at 3. Subscription = Non Perpetual License | ie | When you stop subscription you lose access to using Vectorworks
  7. Wayback time machine has the links archived: http://web.archive.org/web/20210413010835/https://www.vectorworks.net/support/custom/vscript/example But yes, VW should fix this
  8. Thanks, ok, so first things first, I am not familiar with the Spotlight tools,lol. (VW Architect version user). But I assume the plugins work the same. I'm still not following the diagram above. Am trying to figure out what objects are what. - Is the gray truss a vectorworks object? I assume the magenta ones are the spotlight fixtures, and your custom plugin is the one labelled Soca breakout? - And the grey lines are also another custom plugin? The cables one? Each plugin will have an insertion point and a rotation value attached to it. I would start there and use basic trignometry (soh, cah, toa) to get exact locations and orientations of each object. Then using the vs.Distance call on the values you've calculated. Could you share a dummy vwx file. I also have a Designer version that can open spotlight stuff. Cheers, Tui
  9. Hey @Jayme McColgan. Would you mind sketching on the screenshot the actual measurements you're trying to calculate. Oh, and also where are the insertion points for each plugin object shown there.. Cheers
  10. Spot on @Christiaan. The yearly cycles are a headache precisely because of the number of major features included in a yearly release. If features were spread out over the year, users could focus on learning a new feature for each quater then use that in the next quarter, instead of spending 3quarters of the year learning and trying to implement new featuers/workflows, almost in time for another yearly release with another new set of features or workflows.
  11. twk

    Scripting stories

    Should have searched, found this little nugget from @Pat Stanford code below: ## LEVELS def get_all_level_types_in_document(): doc_level_types = vs.GetNumLayerLevelTypes() level_type_names = [] for i in range(doc_level_types): level_type_name = vs.GetLevelTypeName(i+1) level_type_names.append(level_type_name) return level_type_names ## GET LEVELS ASSOCIATED WITH A STORY def stories_level_elevations(story_name:str): data = [] doc_level_types = get_all_level_types_in_document() story_handle = vs.GetObject(story_name) for level_type in doc_level_types: elev = vs.GetLevelElevation(story_handle,level_type) result = vs.AddStoryLevel(story_handle, level_type, -123, '') # DUMMY LEVEL ASSOCIATION if result: # result is true if level not associated with Story, therefore we delete this temp association vs.RemoveStoryLevel(story_handle, level_type, False) else: data.append(f"Level Type {level_type}, Elevation : {elev}") return data stories_level_elevations("L2")
  12. twk

    Scripting stories

    Hey @_c_, Just trying to get a simple story report going for our templates, did you ever figure out how to get levels associated with a particular story?
  13. AFAIK those layer calls cannot use wildcards. Here's some code for design layers you could use to adapt for classes as well. # First build a list of design layers def get_design_layers(): layer_names = [] layer_handle = vs.FLayer() while layer_handle != None: layer_type = vs.GetObjectVariableInt(layer_handle, 154) # filter out design layers only. (1 = Design Layer, 2 = Sheet Layer, 3 = Referenced Layer) if layer_type == 1: layer_names.append(vs.GetLName(layer_handle)) layer_handle = vs.NextLayer(layer_handle) # we now reverse sort the layer_names list. For some reason this method retrieves layers in reverse order of the stack shown in the Navigation Pallette. layer_names.reverse() return layer_names # Code for controling visibility of design layers def set_visibility(design_layer_name:str, layer_visibility:int, document_design_layers:[str]): # 0 = Visible, -1 = Hidden, 2 = Grayed if design_layer_name in document_design_layers: # this line makes sure we don't create a new design layer using next line of code vs.Layer(design_layer_name) # only way to activate/jump to the layer we want, this call also creates design layers if the name provided doesnt exist # then we apply visibilities if layer_visibility == 0: vs.ShowLayer() elif layer_visibility == -1: vs.HideLayer() elif layer_visibility == 2: vs.GrayLayer() # Code for filtering visibility of design layers def layer_visibility(layer_name:str, layer_visibility:int, document_design_layers:[str]): # cycle through design layer names, if layer_name parameter matches any design layer in design layer list, apply layer visibilty # Store current layer, this will make sense later cur_layer = vs.GetLName(vs.ActLayer()) for design_layer_name in document_design_layers: if layer_name in design_layer_name: set_visibility(design_layer_name, layer_visibility, document_design_layers) # since we've activated/jumped to the design layer we're trying to control visibilty of, we will jump back to our initial design layer, stored in 'cur_layer' vs.Layer(cur_layer)
  14. Agree with all of your comments totally @Christiaan. There is quite a common trend in NZ where you have different claddings above, beside and below an opening. We have to split the wall into parts to cater for the change in cladding even though the substrate is the same (timber framed etc)
  15. True, analysis method looks pretty cool. No luck with converting to subdivision though.
  16. Care to share just the model portion of the file? Willing to have a crack at it as well. What about converting it to subdivision and using the split mode?
  17. twk

    Idiot DTM question

    Quite a massive Site Model there! I wonder weather the GIS Map capabilities inside vectorworks would have better satellite imagery
  18. twk

    Idiot DTM question

    Options that come to mind are: 1. A texture bed tracing the water edge 2. A large slab/floor object just above water level, with opaque texture
  19. Thanks Pat, those seem to be calls for fields on the datasheet for the object, not the actual custom record.
  20. Does anyone know which function calls to use for setting record fields to be controlled by the data manager field mapping. Have just setup a data mapping for a particular record to WinDoor objects, and they seem to work -- manually, however I have the records already attached to some odd 200 objects. Have tried vs.SetParamStyleType, put that seems to be only for plugin objects, not records. Any help, or pointers in the right direction would be greatly appreciated. Cheers, Tui
  21. On a side note, heres a snippet that lists out all installed modules for your python environment (adapted for vectorworks, by adding vs.CreateText(), to be run on design/sheet layer). def list_modules(): import pkg_resources installed_packages = {d.project_name: d.version for d in pkg_resources.working_set} # print(pkg_resources.working_set) text_data = [] for k, v in installed_packages.items(): # print(f"{k} : {v}") text_data.append(f"{k} : {v}") import vs vs.CreateText(f"{vs.Chr(13)}".join(text_data))
  22. Are you on Mac? I've heard somewhere that Tkinter may need to be installed separately as its own package on the MacOS. On my windows one, it comes with Python3.8 that ships with Vectorworks
  23. Set Fill Pattern to 0 https://developer.vectorworks.net/index.php/VS:SetFPat
  24. @Christiaan, I did think about it!
  25. Well I'll be, that actually should've said 'checking' subset fonts. Thanks @JMR
×
×
  • Create New...