• Content count

  • Joined

  • Last visited

Community Reputation

76 Excellent

About DomC

  • Rank

Personal Information

  • Location
  1. You are a real pro...
  2. Hi Seems, that the"ConvertToGroup"-Node, fails in this situation because there is something unclean with the output of this operation. The pragmatic solution would be, to make your profiles blue symbols and give up "ConvertSymbolToGroup". You can edit the symbol settings (right click resource browser) and check "insert as group or similar" Speaks something against this? I will look at the SymbolToGroup-Node, if I have time for this. This will not be soon. Yes, the symbol list in the symbol-name inputter, ist not dynamically. It could be ... but the list eitherway would only be updated, if you edit input node and exit it.
  3. Just in addition As so often ... good things are already there. #COMMAND;REFFILE;[VWLibDef]/DomC\; While this will not optimize speed and reduce number of node-classes in the generated python script, but at least the wish is granted, to keep nodes synced and up to date. Also this will work, if the file reference does not exist the file will be automatically created after edit the respective node.
  4. You are right The Connection order influences the order of node execution, so this is not a reliable solution. Maybe the proper way is to create a python wheel package which provides custom modules to the Marionette script. Or leave it Marionette stile and deliver the functions/values through the visible wires. Wireless Node connections ... hm ... somehow cut across the idea of visual scripting :-) Thanks for Feedback Dom
  5. Hi Rick There is nothing wrong with the "Linear Array xyz"- Node. It moves the object you input and returns them as single objects (The group is made from Marionette after all object creation). If you connect a "Move"-Node, it will move every object by your move Vector. The "Linear Array xyz" - Node, will do the job. Node: The Move-Node is not error free. If you have a screen planed symbol it will not move. If you have this, just use this "corrected" Move-Node Move corrected.vwx Anyway: It would be better (faster) to just move your first object on the right place, and then array it. If you move them after array you move them a second time.
  6. Version 1.0.0


    This Example shows, hot to have a any (complex as you want) geometry with a parametric length (available by the yards). The Geometry was not modeled and parameterized in the script. But this is the advantage which this example shows. So take every geometry (import files etc) and just "cut" the length you need. Thats how this script works. It cuts away from a maximal part length (input as symbol) to the length you need. You can make an own symbol and rename the symbol input of the script. The Symbol cross-section now is limited to one meter. You can edit the script and increase this if necessary. Or look at this, with this method, you can model frame and installation plate in your script. The "fill" you can make with the method of this example script.
  7. Version 1.0.0


    More powerful, than a database or text application. A Vectorworks integrated label-script-example with Marionette. The attached example shows how to import address data from a worksheet (could be other data and sources) and additionally places symbol beside the address. The power of Vectorworks and Marionette allows us to put everything you like dynamically on that labels. As example sort by male and female names (if possibly :-) and generate a individual pictures. Just infinite possibilities.
  8. Hi Thanks for the Feedback. Yeah, time is a problem. I think it needs about 100-200 hours (without any help) to get some kind of routine. If you have time to do further work on your project: You could create a symbol list (Vectorworks Worksheet). Copy-paste in excel (or similar) and form a list ['Symbol-1','Symbol-2','Symbol-3','Symbol-150'] so you can create a "hardcoded" (if you add symbols, you have to manually update your popup list ). Sure, we could create a dynamic list of symbols and fill them in a list value for the popup automatically. Just Enter the popup Node, pressing OK and the popup shows all new Symbols. Exactly, if you modificate the Input Node, as I explained. Or you could use the If Nodes in Stephan's Example to "translate" the Numbers into Symbol Names, but with 150 Symbols you will got 450 Nodes just to choose symbol Name :-) Yes that is possible. There is something I maybe have to clarify: 1. The symbol definition is not the same, like a Symbol in drawing. If you delete, manipulate a symbol in drawing, nothing happens with the symbol definition. 2. The "Symbol in Folder"-Node access directly to the symbol definition if you want. But it is not designed to get directly a single symbol with a specific name. 3. So the standard workflow is, you first insert the symbol into the drawing. And then use that "symbol in drawing" -object. There are different ways like always: 3.a ungroup the symbol with the node from here: from "Operation Nodes" 3.b Or Make your symbols blue symbols, so you just have to ungroup I recommend you do it with 3b. That is the way which works, without any additional nodes, just with standard-nodes. I can remember there were discussions about this here, but I can't find the thread now. I am pretty sure there was something better than using a custom created node. Example attached ... Access Symbols.vwx
  9. Hi 1. "Symbol in Folder v02"- Node This "Symbol in Folder v02"- Node, returns all Symbols out of a Symbol-Folder Name, which you can input with a String. Alternatively you can pull (import) all Symbols out of an external File if you feed "isFile" input with a True boolean. It looks like you just want to use one symbol. Just make a blue Symbol of your cadre and insert your cadre symbol with the standard Symbol-Node. You don't need "Symbol in Folder"-Node. 2. The Input Popup. Not that's the issue here and I don't want to be a smartass to other Marionette makers but it would hurt to not comment that :-) Your input popup returns integers from 0 to 7. Then he make a attach the same index number as in the popup to the integer. "If input is 0 then it return cadre1" as example. You can "eat" those 30 Nodes if you just edit the input node as following. It is allowed to do this because this popup anyway is custom edited node. : #SM #Dom output string instead of index numbers @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): this = Marionette.Node( 'Popup' ) this.SetDescription('This node demonstrates the use of a Popup OIP control. The values returned by this node will be integers based on your selection starting with 0 for the first option and increasing by 1 for consecutive options.') cadres = ['cadre 1', 'cadre 2', 'cadre 3', 'cadre 4', 'Paperback', 'Penguin', 'Generic'] input = Marionette.OIPControl( 'Popup', Marionette.WidgetType.Popup, 0, cadres) input.SetDescription('an OIP control representing the options designated within the script editor') output = Marionette.PortOut('int') output.SetDescription('an integer corresponding with the option selected in the OIP. Returned values range from 0 to one less than the number of options.') def RunNode(self): input = self.Params.cadres[self.Params.input.value] self.Params.output.value = input 3. Symbol eater I wrote that peace of code in the "Symol in Folder" Node so I wand to defend it against blaming it to be a sombol-eater :-). The Symbol Folder node, should not delete anything. It just returns names and handles. If you import the symbols from an external file, it will create a symbol folder with the file name and automatically import the symbols (which will nested automatically into this folder). And at the end of the script all symbols will be moved in the symbol folder again. I can't remember why I did this but I can't exclude an issue with that. I guess you use the the content node. And this returns the content of your symbol definition. If you delete or use that content in something that eats It (An extrude?) your Symbol content is vanished out of your symbol definition. You should first insert your symbol into the drawing (Standard Symbol node) and then you can make whatever you want with it. Your symbol definition will not be affected by this. We are waiting eagerly to see more of your example. DomC
  10. Hi I am not sure what is best practice to script a complex scripting-project in Vectorworks. For me a Marionette Script hast the big advantage, that I have a kind of visual pattern to unterstand the script also to launch other users into a scripting project. Also I got the experience, that I can't understand one of my own scripts I did weeks ago which I did not create a very detailed documentation and which are just text based. But I can unterstand my old Marionette Scripts after some minutes of induction. Even if there are custom nodes the Marionette container is still a powerful and visual organization tool for scripts. So it try to do scripts as long as possible in a Marionette class. For complex projects it can be reasonable to code a Classic-Script or outsource some content in external resources. Just to reduce the number of nodes and the complexity of the wire system. Also sometimes it feels noobish to create the same functions in different nodes and lead values from the start of the scripts kilometers to the end of a script. So I searched a way to create global functions(methods) and global values for a script. There are different ways: 1. Create external Python module and use them as an instance to use it in every python script or marionette script The Big minus for that is, that resources have to be transported from one computer to the next or have to be checked/installed by the script itself. 2. Create global functions and global values inside the Marionette network. It tried the following, which work: 1. define globals in the first possible node in the network, which has to be wired to all nodes which wants to use the globals. # Example: global test test = 'This is a global variable' global globalFunction def globalFunktion(): vs.Message('global Function sucessful called') #or this way This will create a Resource list which can be used in all connected nodes Marionette.Symbole = vs.BuildResourceListN(16,path) Marionette.Texturen = vs.BuildResourceListN(97,path) #My original code defines as example functions to import resources in the document if they are needed. And should prevent of creating or #wiring a resource list in every node the resource are needed. import vs import xml.etree.ElementTree as ET path = self.Params.inPath.value+'/'+self.Params.file.value tree = ET.parse(path) root = tree.getroot() raumDefinition = []; Moebel = []; Produkt =[] for child in root: t = child.tag if t == 'raumDefinition': raumDefinition.append(child) if t == 'Moebel': Moebel.append(child) if t == 'Produkt': Produkt.append(child) path = self.Params.inPath.value+'/'+'3D Daten.vwx' #####globals start Marionette.Symbole = vs.BuildResourceListN(16,path) Marionette.Texturen = vs.BuildResourceListN(97,path) global texturMaker def texturMaker(requested_textures): res_list, n = Marionette.Texturen for item in requested_textures: for i in range(n): n = vs.GetNameFromResourceList(res_list, i) if item in n: s = vs.ImportResourceToCurrentFile(res_list, i) def symbolMaker(requested_symbols): res_list, n = Marionette.Symbole for item in requested_symbols: for i in range(n): n = vs.GetNameFromResourceList(res_list, i) if item in n: s = vs.ImportResourceToCurrentFile(res_list, i) #####globals end self.Params.raumDefinition.value = raumDefinition self.Params.Moebel.value = Moebel self.Params.Produkt.value = Produkt Can somebody see any issues by doing this? Or maybe can see a better way? Is it better to use the global keyword or is it better to write the variable into the Marionette class?
  11. Hi The "GetFiles"-Node, need a suffix (skp) I think. Enter the suffx in the string input node. Hope this helps Dom
  12. Thanks guys Seems to was an issue on my system. The delay by exit the symbol is normal, because it caches the script and updates all pios which contains the symbol instance. This is related to the dimension nodes inside the script. Unfortunately I have no comparison about the speed, because I see no other scripts with dimensions here in the community board.
  13. Hi Someone feel like test, if this script run on your machine? :-) Please save (close) all open Files first. I saved a file with a marionette PIO on my Sierra Mac Book in the office and it worked perfectly. Now on my iMac at home, this script do not want to run anymore (also sierra). I started standard-practice for searching the issue: 1. Rename User PlugIn Folder (where the Marionette settings are) --> still crash 2. Copy/Paste Script out of the symbol and run --> worked 3. Rename Symbol --> worked 4. Close all files and revert to the the original file which did not worked before --> worked?! Maybe a problem with my user cache or user settings. 5. After restoring my user settings to the old version it is still working .... ok, back to work this will stay a secret Thanks 20170609_a.vwx
  14. Version 1.0.0


    The Example file contains two PlugIns for 2D Light effects.
  15. Version 1.0.0


    This Marionette Script creates multiple space objects from worksheet data. A very nice and time saving Marionette script to automate a routine peace of work. Spaces from List.vwx