Jump to content

DomC

Member
  • Posts

    604
  • Joined

  • Last visited

Everything posted by DomC

  1. I think it is a "limitation" not a bug. Because there is the scale-workflow. The only event the Network keeps the relationship of node size and network size is a layer scale. You are right, copy-paste improvement would have been more useful than layer scale. To my knowledge it does not support the following other (often used) workflows directly: 1. Copy-paste network or plugIn on a layer with another layer scale 2. Edit in a symbol with a network, that was created by an active layer of another scale 3. Also there is an issue, if I copy-paste a network with text or graphic documentation. It think it is all a question of development priority. For me this was about point 4 in a list of wishes with 10 points. But for other marionette workers (which are not get used to that limitation) it could be priority #1 :-)
  2. DomC

    Updating Node

    Hi I have nodes, with the following headline: #COMMAND;REFFILE;[VWLibDef]/DomC\Script.py; This is great, because instead of copy/paste an updated code into every node of that type I used in a project it is up-to-date, whenever I edit A node. Also editing a node, will update the resource on my disk and will make up-to-date other nodes which I edit. Also I am able to edit the node in an external editor, whithout copy/paste the result code. Anyone has an Idea, how to update hundreds of nodes in a document, which are all linked to the same file instance but are not up to date. Edit and exit every node after update steals time from making new fantastic marionette projects. Besides: How about tagging the nodes with the year, they are released first time? We have to manually compare (or making a marionette script for resource comparing :-) -> another great Idea) the two versions to see, which nodes are new. How many time I created a custom node, which was already there in a new version but I did not realized.
  3. 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.
  4. Just in addition As so often ... good things are already there. #COMMAND;REFFILE;[VWLibDef]/DomC\TheNode.py; 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.
  5. 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
  6. 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.
  7. Version 1.0.0

    139 downloads

    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.
  8. Version 1.0.2

    178 downloads

    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.
  9. 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: https://forum.vectorworks.net/index.php?/topic/47801-the-rest-of-domc-nodes/#comment-240786 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
  10. 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
  11. 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?
  12. Hi The "GetFiles"-Node, need a suffix (skp) I think. Enter the suffx in the string input node. Hope this helps Dom
  13. 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.
  14. 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
  15. Version 1.0.1

    274 downloads

    The Example file contains two PlugIns for 2D Light effects. https://youtu.be/34gu6EEvhog
  16. Version 1.0.4

    845 downloads

    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. Please consider, that the the script takes the area column and calculate the square with that. If you have a language settings with comma instead of points for decimal seperator, the calculation will fail. Use points as decimal character or eliminate decimal places in your list
  17. Version 1.0.4

    947 downloads

    The heart of this Marionette example is the RectPack node. A node with over 2600 lines of code! It supports dozens of packing algorithm to pack rectangles on another rectangular area in a space and time-saving way. The right combination of packing and bin algo gives the ability to pack rectangles in a way you want to have them on your machines (as close as possible, always cut complete board, less cuts etc.) Actually not even myself know, which packing algo ist right for which use case. Also for professional use case, usually there is a machine dedicated software, which packs the port in a way which match best for the machine. So I see the main use case to pack parts on a board for milling them on a cnc-machine as example for model-making. Workflows which uses a guillotine-workflow (always cut the whole board) often have special requirements which maybe could be reached with the choice of packing algorithm or maybe can not. The Marionette Example based on foundational work: http://www.secnot.com/ Python code for packing algorithm Jukka Jylang - A Thousand Ways to Pack the Bin - A Practical Approach to Two-Dimensional Rectangle Bin Packing (2010) Huang, E. Korf - Optimal Rectangle Packing: An Absolute Placement Approach (2013) General Features: - Input of basic data like length and width - Input of additional data - object input (node detects if part input are objects and process them like rectangles) - sort by material - use a list of stock materials .... Not all input combinations works at the moment. Recommended to use the existing examples to get correct input values. German Movie https://youtu.be/yyZGvazL7Ik
    Must not be missing in every node collection. My favorite Node.
  18. This is not so easy 1. True/False Input you should do with a booleadn input (1,0) 2. The node you use setup the ressource, not the mapping on your object. 3. The Input of "Set TextBmp Property" needs a TextureBitmap 4. The "GetRes"-Node returns a ressource, you need to get shader record from that first and then get the bitmap ressource (there was no node for that I created one) 5. Be careful by naming nodes with àéè. Attached Example should work. SetRepeatTextureBitmap.vwx
  19. Try the "GetRes"- Node from the File "Object Info Nodes.vwx" You find that file here: https://forum.vectorworks.net/index.php?/topic/47801-the-rest-of-domc-nodes/ This Node will return a Handle and a Name to the Ressource defined by the "TypePopup"
  20. Hi The "GetFiles"-Node, collect files by a suffix. I think you input a wrong suffix (fill in suffix in the string input without the dot). If you want to see, which suffix your image files use, you can see that by select your file in the finder and hit cmd+i. OK, the "GetFiles"-node could be improved by collect all files, if suffix is not delivered by user input. Edit: I can't say what "Image Prop" exactly do "texture ref" seems to be something which already have to exist in the drawing. I can remember, I tried to abuse "Image Prop" to batch import 3D Textures but that failed. I used a script instead, to convert images to arroway import-format here. And import them with the import-arroway command: https://forum.vectorworks.net/index.php?/topic/46877-create-a-texture-with-color-shader-with-imported-image/#comment-239269
  21. Hi Sam Can it be a python script? #Python Script. Returns connecting radius from 3 selected points pts = []; h= vs.FSActLayer() for i in range(3): #Get the first 3 selected objects pts.append(vs.GetLocPt(h)) h = vs.NextSObj(h) c = vs.ThreePtCenter(*pts) d = vs.Distance(c[0], c[1], pts[0][0], pts[0][1]) vs.AlrtDialog('Your Radius is '+str(d)) vs.ArcByCenter(c[0],c[1],d,360,360) If you are more familiar with pascal syntax than me: ThreePtCenter() and Distance() should do the job
×
×
  • Create New...