Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by twk

  1. When adding scripts to worksheets, there is a dialog box that pops up every time saying would you like to block or execute scripts in this worksheet? Question: Can we somehow block or execute this option, through a script?
  2. Greetings all, Does anyone know how to get glazing areas from a curtain wall object? And a harder question, how would we query only the glazing (minus the spandrel area)? Possible/Not Possible?
  3. Chiming in here as well with same reason as others. Converted files are problematic. It has affected our wall styles/textures/section viewports. Rule of thumb for us is to never switch versions in a projects life cycle. With regards to the OP's topic header, Yes we have been using BIM successfully. Our workflow still incorporates 2D overlays still (wall cuts/flooring/insulation), in the 'annotation space' of viewports.
  4. In the Sheet Layer context, the Sheet Number component, is basically the Layer name. so you'd use: """ Disclaimer: no warranties of any kind, expressed or inclined. Code provided for self-help use only. Save work, save often. Tui W K 2018 """ def list_layers(): # sub_function to retrieve list of layer names in document layer_names = [] hLayer = vs.FLayer() while hLayer != None: layer_names.append(vs.GetLName(hLayer)) hLayer = vs.NextLayer(hLayer) return layer_names # SAFE CHECK: # check if name is in the layer list, # then create new layer if it's not in the list. cur_layer_to_change_name = "SomeCurrentLayerName" #Replace Name of an existing Sheet Number cur_layer_handle = vs.GetLayerByName(cur_layer_to_change_name) newLayerName = "SomeNewName" if newLayerName not in list_layers(): vs.SetName(cur_layer_handle, newLayerName) HTH, Tui
  5. screenName = "Screen 1" SheetNumber = "01" layerType = 2 layerName = "Module Layout - " + screenName newLayerHandle = vs.CreateLayer(SheetNumber, layerType) # <-- Sheet Number in the Sheet Layer context, confusing I know vs.SetObjectVariableString(newLayerHandle, 159,layerName) # <-- Found on the DevWiki Appendix page. Documentation states Layer Description, which is also misleading, as it is actually the Sheet Layer 'name'
  6. +1 this. We are getting more apartment/terraced housing projects. Having to scroll through a list of sheets of a 6 story apartment(which comprise of 6 overalls plans and 35 individual floor plan types), just to get to the design layer list through the pull down, sure is an unnecessary waste of time. We do have a workaround though: having the navigation palette always open, but I see the benefit with this request. Cheers, Tui
  7. You could force the parameter? Below is the node with all fields available. Set Fix Profile to True. Disclaimer, I haven't tested this extensively. So use at own risk, save work, etc. #Modified by TWK May 2018 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "Path Extrude" ) this.SetDescription('Extrudes a profile along a path') #Input Ports profiles = Marionette.PortIn( vs.Handle(0), 'hProfile' ) profiles.SetDescription('The profile to extrude') paths = Marionette.PortIn( vs.Handle(0), 'hPath' ) paths.SetDescription('The path to extrude along') eapScale = Marionette.PortIn( 1, 'eapScale' ) eapScale.SetDescription('Set scale of the Profile') eapFactor = Marionette.PortIn( 1, 'eapFactor' ) eapFactor.SetDescription('Set Factor?') eapLockProfile = Marionette.PortIn( False, 'eapLockProfile' ) eapLockProfile.SetDescription('Lock Profile') eapFixProfile = Marionette.PortIn( False, 'eapFixProfile' ) eapFixProfile.SetDescription('Fix Profile') #OIP Controls #Output Ports xtrds = Marionette.PortOut('hObj') xtrds.SetDescription('The resulting object') #BEHAVIOR this.SetLinksObjects() savedView = None this.SetInitFunc(Marionette.InitializeView) this.SetFinalFunc(Marionette.RestoreView) def RunNode(self): #inputs prof = self.Params.profiles.value path = self.Params.paths.value scale = self.Params.eapScale.value Factor = self.Params.eapFactor.value LockProfile = self.Params.eapLockProfile.value FixProfile = self.Params.eapFixProfile.value FixProfile = "Yes" if FixProfile else "No" #script if prof != 0 and path != 0: profile = vs.CreateDuplicateObject(prof, vs.Handle(0)) cntr = vs.HCenter(profile) vs.HMove(profile, -cntr[0], -cntr[1]) if vs.GetTypeN(path) is not 111: oldPath = path path = vs.ConvertToNURBS(path, True) vs.Marionette_DisposeObj(oldPath) eap = vs.CreateCustomObjectPath('Extrude Along Path', path, profile) vs.SetObjectVariableBoolean(eap, 1167, True) vs.SetRField(eap, 'Extrude Along Path', 'Scale', str(scale)) vs.SetRField(eap, 'Extrude Along Path', 'Factor', str(Factor)) vs.SetRField(eap, 'Extrude Along Path', 'Lock Profile Plane', str(LockProfile)) vs.SetRField(eap, 'Extrude Along Path', 'Fix Profile', str(FixProfile)) vs.Marionette_DisposeObj(prof) #outputs self.Params.xtrds.value = eap
  8. The updates are awesome, particular, love the feature to check the forum topics I want to see in a single page.
  9. http://developer.vectorworks.net/index.php/VS:Function_Reference#Worksheets http://developer.vectorworks.net/index.php/VS:CreateWSImage def vs.CreateWSImage(worksheet, location): return HANDLE from the Dev Wiki. location is 2DPoint location on the drawing. eg: ws_name = "Worksheet-1" # this is an example, replace with name of your worksheet you want placed on your drawing ws_def_handle = vs.GetObject(ws_name) # grab a handle to the worksheet definition in your resource manager location = (0,0) # places center of drawing ws_handle_on_dwg = vs.CreateWSImage(ws_handle, location)
  10. Greetings all, Wondering if I'm the only one facing this problem. The 2D Cut/Fill Area check box for Site Model(s) is not working anymore in 2018. Was working in 2017 (attached video). Posting here to see if no one else has this problem, it could be my file. Cheers, Tui
  11. +1 for this. After 15+ years of using Vectorworks, I have just now delved into the dark world of call-out notes/databases/keynote legends. All went well until I realised you cannot get rid of the period after the keynote label, in the keynote legend. Please, if there's a way, could someone let me know. If not, please add this request to this wishlist item.
  12. This is great! Thanks for the update..
  13. I haven't tested the code below, but I believe it goes something like that: (You'll have to declare those variables though; ah Vectorscript ) { Orso *********************************************** } { wraps a string in '' } FUNCTION T_Apo(str: STRING): STRING; BEGIN T_Apo := Concat(Chr(39), str, Chr(39)); END; RecordName := 'Group-A' FieldName := 'Mark' FieldValue := '2001' crit := Concat(T_Apo(RecordName),T_Apo('.'),T_Apo(FieldName),'=',T_Apo(FieldValue)) Counter = Count(crit) Message(Concat('Total Count = ',Counter_))
  14. You could convert that 660 line macro in VS to python .. (jokes) When I used to use vectorscript, the VectorLab website was an invaluable resource. Here are two functions by @orso b. schmidthat helped me string together criteria(s): http://www.vectorlab.info/index.php?title=Txt-Braket http://www.vectorlab.info/index.php?title=Txt-Apostrophe
  15. One of the reasons I jumped to learning python was the Criteria String building in vectorscript, proved really difficult for me. try this, in python: RecordName = "Group-A" FieldName = "Mark" FieldValue = "2001" crit = "'{}'.'{}'='{}'".format(RecordName,FieldName,FieldValue) GroupPanelCount = vs.Count(crit) vs.Message("Total Count = {}".format(GroupPanelCount))
  16. Thanks @Hippocode and @BillW. Was just looking through the dev wiki and totally missed that one. Thanks heaps!
  17. Greetings and Happy New Year to you all, Has anyone figured out how to duplicate an object (locus,symbol) along a 2D path, be it a polyline, polygon? Developing a plugin to take a symbol object and have it duplicate along the Plugins 2D path (this being a 2D poly path plugin object type). Have tried the : def vs.GetPointAndParameterOnNurbsCurveAtGivenLength(inNurbCurve, inPercentOfLength): return (BOOLEAN, p, outParam, outIndex) by converting the 2D path to a nurbs object, running the calc, then copying the /out/ data to the 2D path poly. However just realised the convert to Nurbs command takes into account the orientation of the view. This makes it not feasible for a path-pio object. Any ideas? Cheers, Tui
  18. Please hint that this is coming in v2019. Just had to renumber manually an 85 apartment block drawing set
  19. twk

    It's snowing

    Dom this is awesome! ..and you have too much time on your hands .. Merry Christmas!
  20. Its 2018, next year.. please make this into v2019.. I still dont see the reason why the new class editing, has a whole tab, dedicated to only the Descripiton.. what UI design intent is this? No hating, seriously would like to know.
  21. This is very welcomed.. seeing that different regions have different service pack release dates.. will that be taken into account of as well? Would be great to have that info here as well. Maybe sticky threads for different locales?
  22. Haha,.. I shall wait for the forum upgrade completion before posting the rest then!.. yep there's more.
  23. Should probably start a new post with this Lumion stuff.. but here seems good for now. This will be the last time, sorry for hijacking the Twinmotion thread.. Old Lumion and new Lumion 8 comparisons.. Render time 30secs... still getting used to this.. version 5 - with sketch effects - version 8 - with 'realistic' preset - no post-production
  • Create New...