Jump to content

DomC

Member
  • Posts

    604
  • Joined

  • Last visited

Everything posted by DomC

  1. Version 1.0.0

    87 downloads

    Generally: Popups significantly raises usability of Marionette Scripts. Also for advanced marionette scripters often it is hard to search and enter the values. Situation Now: 1. The Popup values has to be written in an input node or the params class of the node, which do just execute if node is edited. 2. Popups are not dynamically unless the values are calculated by the script and then the Popup will popup every time the script is running. What does that Node improve: 1. The popup values can be directly pulled from a worksheet. 2. The provided node filters one popup with another popup, which is very efficient for fast filtering and combine choices Worksheet Popup.mp4
  2. Like I told, you need to run the network, which pulls the values from the table. then you have to deselect and reselect the node. And then the popup is there. but not on the wrapper or a Marionette PIO, because this Node has an input and nodes with an connected Input will not shown on the wrapper or a Marionette PlugIn. Thats why option #2 is the only proper solution. The posted example is option #1.
  3. Version 1.0.1

    64 downloads

    Generally: In everyday life job is very often reading and writing record fields of user record formats and PlugIn objects. Situation Now: 1. Marionette users have to know the record name and need a lot of knowledge to get the universal name of PIOs 2. Marionette users needs to manually find and transfer the field names into string nodes and also have to know a workflow to find the universal field names of PlugIns. 3. copy/paste of the names or writing the values is stressful and often results in type errors. What does this Nodes improve: 1. Quick access to record formats, PIO records and field names 2. See the localized and universal names (if exists) of the fields, returns universal names to the script automatically 3. Can also be used in combination with "print debug" to show names for editing existing networks without using directly the node Record Popup.mp4
  4. Version 1.0.1

    46 downloads

    About This File This Node is similar like the Name-Node. Instead of writing the Name in the Node Infos, you can select the Name from a Popup, wich maybe is a little bit more comfortable. Using the Name input is often used by myself for quick testing, debugging or Stand-alone Scripts. This node helps eliminating errors like writing the name on the wrong field or copy/paste the name on wrong place etc. A new innovation implemented, is a visual feedback of the node, which zooms the named object while choosing it in the popup. Which is a very interesting advance to improve user friendliness of Marionette nodes. Ideas for further improvements: 1. Checkbox if zoom or not (not sure, because to many checkboxes decreases usability) 2. A Pick option to pick an object and auto-naming and inputting with this picked object (Not implemented, because I have not got it to work, that a pick callback runs inside of a Marionette script) Name Popup.mp4
  5. Hello Solved by searching the Forum. Seems we need backward indexing to delete the choices. Here the working popup Dialog. choices1 = ['choice1', 'choice2', 'choice3', 'choice4'] choices2 = ['choiceA', 'choiceB'] def CreateMyDialog(): vs.dialogid = vs.CreateLayout('Dialog Name', 0, 'OK', 'Cancel') dialogID = vs.dialogid vs.CreateStaticText(dialogID, 10, 'Popup', 60 ) vs.CreatePullDownMenu(dialogID, 11, 40) vs.CreateCheckBox(dialogID, 12, 'Change Popup') vs.SetFirstLayoutItem(dialogID, 10) vs.SetBelowItem(dialogID, 10, 11, 0, 1) vs.SetBelowItem(dialogID, 11, 12, 0, 1) return vs.RunLayoutDialogN(dialogID, Dialog_Handler, 0) def Dialog_Handler(item, data): dialogID = vs.dialogid if item == 12255: # enter Dialog 12255 -> 12256 exit dialog for i in range(len(choices1)): vs.AddChoice(dialogID, 11, choices1[i], i) if item == 12: #checkbox num_choices = vs.GetChoiceCount(dialogID, 11) for i in range(num_choices, -1, -1): vs.RemoveChoice(dialogID, 11, i) if data: #checkbox True for i in range(len(choices2)): vs.AddChoice(dialogID, 11, choices2[i], i) if not data: #checkbox False for i in range(len(choices1)): vs.AddChoice(dialogID, 11, choices1[i], i) result = CreateMyDialog()
  6. Hi Thanks @Julian. seems we need backward indexing for deleting the choices.
  7. edit: Found something in the Forum here. I will try to check this.
  8. Hello Would be great if anybody could help me. At the end result I want to be able to exchange a popup's choices. What I am trying to do is, that I delete the items with vs.RemoveChoice() and build it new with a loop through my choices. I think I make something wrong by indexing with "AddChoice" or "RemoveChoice" just remove the string not shorten the Choice Numbers. My script: choices1 = ['choice1', 'choice2', 'choice3', 'choice4'] choices2 = ['choiceA', 'choiceB'] def CreateMyDialog(): vs.dialogid = vs.CreateLayout('Dialog Name', 0, 'OK', 'Cancel') dialogID = vs.dialogid vs.CreateStaticText(dialogID, 10, 'Popup', 60 ) vs.CreatePullDownMenu(dialogID, 11, 40) vs.CreateCheckBox(dialogID, 12, 'Change Popup') vs.SetFirstLayoutItem(dialogID, 10) vs.SetBelowItem(dialogID, 10, 11, 0, 1) vs.SetBelowItem(dialogID, 11, 12, 0, 1) return vs.RunLayoutDialogN(dialogID, Dialog_Handler, 0) def Dialog_Handler(item, data): dialogID = vs.dialogid if item == 12255: # enter Dialog 12255 -> 12256 exit dialog for i in range(len(choices1)): vs.AddChoice(dialogID, 11, choices1[i], i) if item == 12: #checkbox if data: #checkbox True num_choices = vs.GetChoiceCount(dialogID, 11) for i in range(num_choices): vs.RemoveChoice(dialogID, 11, i) for i in range(len(choices2)): vs.AddChoice(dialogID, 11, choices2[i], i) if not data: #checkbox False num_choices = vs.GetChoiceCount(dialogID, 11) for i in range(num_choices): vs.RemoveChoice(dialogID, 11, i) for i in range(len(choices1)): vs.AddChoice(dialogID, 11, choices1[i], i) result = CreateMyDialog()
  9. Like I told I do not work on that node, just a proof of concept and you had to edit the node code to make it usable. I think I want to provide a useful node maybe but not now. However, the popup delivers an index and this index corresponding to the lines in the popup and the lines in the worksheet. You could do this to return the value of popup instead of index. self.Params.output.value = j['data'][0]['popupChoices'][input]['text'] Or this, to return the line from the worksheet (which is the better option) self.Params.output.value = lines[input] input is the popup index.
  10. Hello The Custom Popup Widget from the Nodes, are generated by editing the Nodes. There are some special Popups which are handled by the Marionette core itself. As example the class popup. If you add classes the popup will contain that new class. You can generate the popup items with a script from a worksheet. No question. Lets say, you can say the popup the have those items from the worksheet by script. You have to run the script to deliver the items of the popup. If you click on a popup with items generated like this and you do not run the network your popup has no data because no script was executet. So what can be done without manipulationg the core too much: 1. Create a node with a popup, which takes items from the input. You have to run the network bevor the items are activated. (Example Attached) 2. Create a dialog push Button or a Dialog which runs when the script runs. 3. Dis Dialog has his own popup and can be generated with every functionality of script engine. 4. Having a seperate script (as example in the worksheet), which will push the worksheet changes to the node popups widgets. probably it could be possible to manipulate or generate the popup in the Marionette class but it is not something I grabbed before and I guess I would not provide public. So the best option in my opinion is #2, where we have a push button with the popup. The popup will always be up to date. Maybe an issue, if the push-button is nested too deep in wrappers and Object Nodes. So if you do something, always check if it works in your final product. But also this could be an issue with the other variants. Here the example, how to overwrite the node-popup from outside. Also this technique is provided a long time ago in the gallery. The Node is just a proof of concept, you cant use it without edit the node code for your own usage. I try to make an Example in the Gallery, which takes a worksheet input and have a push button for choosing the popup. Because this sounds for me very useful for many Marionette users and developpers. the interesting think is, that there will be two popup. The first popup will allow to filter the items of the second popup. I think this is not a big thing but as I can remember last Time i made a popup with changing items, i did not known how to eliminate the vestige of deleted popup items. Dynamic Popup.mp4 PopupfromWorksheet.vwx
  11. Hello This Script ist Cross-Plattform and also works on my windows computer. However, the following could go wrong: 1. Did you picked the file? with the PickFile Node Button? 2. Maybe Browser or Antivirus etc. change the downloaded Text file. Check out Text encoding (setting of the import txt v110) latin_1 or cp 1252 should match for windows. Did you opened the textfile with another software like excel or wordpad etc.? Maybe this changed the txt file or the text encoding of the file. 3. Did you used the debug mode and/or the "print debug" to see, which wires have data or not 4. I am using Vectorworks 2022 SP 2.1 on Windows 10. It runs with the downloaded text file and with the Vectorworks File Version 1.0.4. I run with a German Designer Version. Also it works with Architecture or interiorcad Version. I guess not with Landmark or spotlight because there is no space-tool available in this versions. Additional: - The "Split List Absorb" limites the lines to 20 (To not have too look for the first run, if someone have 2500 Spaces in his Textfile) I you would provide your vwx File, I maybe have a chance to find the error in your network.
  12. Must be the configuration of the column C. In the Example File, here is the area. And this must be returned on the port out1, which goes forward to the area of the space. Maybe you can check my movie I attached. Try to follow my stepts (picking your textfile, setup the Area-Column to out1)? I downloaded Version 1.0.4. and tested with the text file. Import Raumprogramm.mp4
  13. Not Issues here. Can you provide your Textfile and your settings? Space from List.mp4
  14. CircularFilling fixed symbol v2021.vwx
  15. @lgoodkind Can you provide picture and an Idea how the algorithm logic could be. That would be nice. If I adjust the node to grab randomly your diameters. The result is as following: still there is white space which could filled up with an enhancement of the algo. But this is quite complicated. Thats why this node is beta version and not finished.
  16. Version 1.0.2

    55 downloads

    This Document contains two Marionette PlugIns. Those PlugIns will simplify the workflow where we have more than one page on one sheet layer. 1. Someone who uses your plans will have an advice if the document of the plan layout are complete. 2. You can see which page you have to print directly on the layout without counting the pages This Marionettes supports Normal- and Landscape Format. Where pages are printed in a different order. Note: One Marionette (multi label) puts a label on every page and have to be inserted at the center (info-palette x0 y0 > please do not move). The other Marionette (single label) can be putted freely on the layout. It returns the page number of its center point. The Multi-Label Marionette, do not support uneven pages like 6.2/2.6
  17. Hi I think this can be made by scripts and/or a Marionette Nodes. I think with getRecordField and with getObjectVariable you can pull the requested values out of a viewport, if you know their IDs. The Advantage of a Standard Label or Data Tag is, that it has a perfect Link to the viewport and a User Interface to link/delink to an object. This could be made with tricks for sure with a Marionette but without a good UI and with supporting scripts etc. So I recommend to try to make your object with the DataTag. Which I think this is all makable with the DataTag except the "arrow symbol" maybe. As Example the Viewport Scale you can pull out with the following formula in a Data-Tag: Scale: 1:#WS_ObjectData('Object Variable', 1003)# Source: https://developer.vectorworks.net/index.php/Worksheet_Functions Some of the Object Variable of a Viewport (You can see them with the Methodes mentioned above): The Rest you can get from the Data-Tag Standard Variables. The Method to find Object Variables is the Script Reference or exporting a Drawing with one viewport as a text Format and search the Viewport's "SetObjectVariables". Change one value of the viewport and export again and see, what changes. Or you can use the "SearchObjectVariable" Marionette. Must be here in the forum but can't find it right know. The Data-Tag is a very powerful Drawing label. Only disadvantage is missing links between VP and Labels and no Links in Exported PDFs.
  18. Hi You are quite near at the solution. You need to repeat every poly handle as many times as there are points on that polyline. To get the number of points you have to get the number of items in every list you created with the chunk by list node. Also here you need a node, that is not standard. I do not know to do it with standard nodes. I think chunk by list and length of sublists is something, that I is really missed by repeating things on n objects. The Node you can see GetListLength ist the standard Node but the line "this.SetListAbsorb()" is commented with a #. Different ways to solve that I think. Nice Example. ScreenFlow.mp4
  19. Merry Christmas for all Vectorworks Nerds 🙂
  20. Hi The Field name of "Gesamt Breite" ist 'Width' not "Breite". If you change that, you will get the right object. If you set a name of the object, you change the name on the object info on the very buttom. Not the Cabinet Name. The Cabinet Name ist generated by a higher "act of nature" we are not able to write that Name field with a Script. Also ungroup I would not use. Because your Symbol is inserted as a PIO. The group around every marionette-created geometry you cant eliminate with the ungroup node. I think this could be changed with the node itself "linkedGeometry" This here, created the group:
  21. As I understand, you want something like global variables for the PIOs on the Document. Like Title Block Project Data. There are several possibilities. I think it depends on what you can handle yourself. 3 Examples of Strategies: 1. You could get the values from a Record handle (the record definition itself not from an Object > It takes the default value). So you had a central control over those values. 2. You could push the values (with a Dialog) directly to the Marionette PIOs 3. Take the value from a worksheet This depends how your Marionette-Code is designed. I guess SimA - Method (Method 1?) would be the best option. To the second Methode. Maybe this is the hardest one because changing the OIP of Marionette is not as simple like with Standard PIOs. There is an Example in the Gallery to make this or you could code A dialog-Window Enter the Value and Push them on your Objects. For myself I use that method to backup values from the marionette on a record. So the script is updated I am able to pull the values if necessary from that record. Code something like this: import json #Globals recName = 'MarionetteObject3D' #recName = 'MarionetteObject2D'# Check, the Marionette Rec-Name for your Marionette PIOs fldName = 'NodeDef_OIPControls' #collect Objects objs = [] def getObj(h): objs.append(h) criteria = "(NOTINDLVP & NOTINREFDLVP & (C='MarionetteObjects'))" vs.ForEachObject(getObj, criteria) OIP_Name = 'Mauerlicht' #Name of the Parameter OIP_value = 1200 #value of the Parameter for obj in objs: sOld = vs.GetRField(obj, recName, fldName) #vs.AlrtDialog(str(sOld)) j = json.loads(sOld) for OIP_field in j['data']: name = OIP_field['varName'] if OIP_Name in name: value = OIP_field['value'] OIP_field['value'] = OIP_value vs.SetRField(obj, recName, fldName, json.dumps(j)) vs.ResetObject(obj)
  22. Hello I posted a Marionette example, that installs a python pillow library from a wheel file with Vectorworks 2022. Now I stuck on Windows.
  23. Version 0.0.9b

    52 downloads

    Unsure on which different OS and how long this will work. I just need it for myself and wanted to share, because I know some of you are waiting for external-library-fix with OSX. For my usecase the issue at the Moment seems to be fixed. Not tested with Windows or other OSX Versions. Runs on my Machine intel Mac Book with Big Sur and Vectorworks 2022 SP1. Do not run on Windows yet. Feedback what it does on your machines is very welcome.
  24. Thanks Vectorworks Inc. for the great job on our favourite core-features in 2022. That's worth a small attention from my side. (Sound Featuring Garage Band, Organic Tower inspired by Johanna Grüneberg, Marie Brackmann (Detmold University, Markus Graf) Trailer.mp4
  25. Fantastic Julian this is a very reliable solution, Thank you. I implemented this way: dim = vs.FSActLayer() def GetDimAngle(h1): h2 = vs.FIn3D(h1) DimAngle = 0 while h2 != vs.Handle(0): if vs.GetTypeN(h2) == 2: BOOLEAN, style, angle, size, width, thicknessBasis, thickness, visibility = vs.GetObjBeginningMarker(h2) if style: DimAngle = round(vs.HAngle(h2),0) h2 = vs.NextObj(h2) return DimAngle DimAngle = GetDimAngle(dim) vs.AlrtDialog(str(DimAngle))
×
×
  • Create New...