Jump to content

Gregi

Member
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Gregi

  1. I got kind of success: With this Tool: vs.DoMenuTextByName('Solid Operations', 4) its doing what i want to do. Even since the index "4" isnt listet in the appendix. Im not sure if its not in the internal version? But it opens a window and asks for user input. Is there a way to skip this input? I could control all the needs in marionette before (its only about direction of NURBS and fore- or background ob objects to select which one will cut the other...
  2. Hi axhake I made a Node, which is taking all objects out of the group which is made by marionette. But the groups you created on your own will stay there. Its just testet a little, but should do what you want. 2020-12-22_ungroupatend_gim.vwx
  3. Hi everybody I would like to cut a solid by a Nurbs Surface. I do know how to do "normal", but i didn't find anything in Marionette or Function Reference to do it. The shown Objects are allready greated in Marionette, so only this last step is missing 🙂 In "normal" it looks like this (German Version):
  4. Hello everybody I would like to create a "dynamic" Popup Node, which uses Content of a Worksheet. It works pretty good, but its not refreshing the Popup-List in the OIP, but the output content is the correct one. So i guess I have to delete the cache of the node or something like that. Is there a way to do so? The Script in the Node: #gim 2020-11-20 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE tabname = 'Spot Standard' #Name der Tabelle tab = vs.GetObject(tabname) #Handle zur Tabelle (numRows, numColumns) = vs.GetWSRowColumnCount(tab) #Zählt die Anzahl Zeilen und Spalten def frange(x, y, jump): #x entspricht der Startzeile in der Tabelle, y der letzten Zeile, jump ist die Schrittgrösse while x - y <= .000001: yield x x += jump list = [] list = [n for n in frange(2, numRows, 1)] #erstellt eine Liste, welche Zeilen aus der Tabelle ausgewählt werden sollen Artikelbeschriebe = [] Artikelnummern = [] for i in range(len(list)): Artikelbeschriebe.append(vs.GetWSCellFormulaN(tab, list[i], 1)) #Die Beschriebe sind in der ersten Spalte Artikelnummern.append(vs.GetWSCellFormulaN(tab, list[i], 2)) #Die Nummern sind in der zweiten Spalte #Name this = Marionette.Node( 'Popup' ) this.SetDescription('Zeigt ein PopUp mit den Werten aus der Tabelle "Spot Standard" und gibt Name und Artikelnummer weiter') #Input Ports #OIP Controls input = Marionette.OIPControl( 'Popup', Marionette.WidgetType.Popup, 0, Artikelbeschriebe) input.SetDescription('Die Auswahl aus der Tabelle "Spot Standard", Spalte 1') #Output Ports outputs = Marionette.PortOut('sArtikel') outputs.SetDescription('Artikelbeschrieb') outputn = Marionette.PortOut('nArtikel') outputn.SetDescription('Artikelnummer') #BEHAVIOR def RunNode(self): #inputs input = self.Params.input.value #Integer der Auswahl Artb = self.Params.Artikelbeschriebe Artn = self.Params.Artikelnummern #script outputs = Artb[input] outputn = Artn[input] #Aktualisierung der Wertetabelle tabname = 'Spot Standard' #Name der Tabelle tab = vs.GetObject(tabname) #Handle zur Tabelle (numRows, numColumns) = vs.GetWSRowColumnCount(tab) #Zählt die Anzahl Zeilen und Spalten def frange(x, y, jump): #x entspricht der Startzeile in der Tabelle, y der letzten Zeile, jump ist die Schrittgrösse while x - y <= .000001: yield x x += jump list = [] list = [n for n in frange(2, numRows, 1)] #erstellt eine Liste, welche Zeilen aus der Tabelle ausgewählt werden sollen Artikelbeschriebe = [] Artikelnummern = [] for i in range(len(list)): Artikelbeschriebe.append(vs.GetWSCellFormulaN(tab, list[i], 1)) #Die Beschriebe sind in der ersten Spalte Artikelnummern.append(vs.GetWSCellFormulaN(tab, list[i], 2)) #Die Nummern sind in der zweiten Spalte #outputs self.Params.input.value = Artikelbeschriebe self.Params.outputs.value = outputs self.Params.outputn.value = outputn Popup mit Werten aus Tabelle_2020-11-21.vwx
  5. Is there any function reference for vs.Mrntte_ControlPoint(nodeHandle, coordX, coordY, coordZ, False) I realized, the second Var (here coordY) is always changing the second OIP-Control, doesn't matter which name is given in the inputs. In my test the second one is giving the Point i want to have, the blue handle is shown at y=100, doesn't matter, where i put the point. But in OIP it chances the Variable. If i delete "ydummy" in the #OIP Controls, every moving in Y-Axis is shown in the "Z" Value, and no moving in Z-Axis is possible. How could the function be Chanced? do you have an idea @sbarrett @DomC CP_1dim_2020-11-17.vwx
  6. I guess I got a solution for my situation. This script gets de active Dimension, no matter if in group or in viewport and changes some parameters. It is based on a script on a Template in Switzerland (VSSM-Vorgabe) which did the same, but wasn't working in groups and Viewports. #hölzli 2020-11-07 #vs.PushAttrs() #h=vs.FSActLayer() l = "'"+vs.GetLName(vs.ActLayer())+"'" crit = '((INVIEWPORT & (L=' + l + ') & (VSEL=TRUE) & (T=DIMENSION)))' out_list = [] def Add_Handle(obj): out_list.append(obj) vs.ForEachObject(Add_Handle,crit) for i in range(len(out_list)): t=vs.GetTypeN(out_list[i]) h=out_list[i] if h == None or t != 63 : vs.AlrtDialog('Bitte eine Einzelmass aktivieren') vs.SetPrimaryDim(h,1,0,'(',')',3); vs.SetDimNote(h,''); #vs.SetPrimaryDim(h,1,0,'(',')',3); #vs.SetPenFore(h, (0,0,0)) vs.SetLW(h,0) vs.ResetObject(h) #vs.PopAttrs()
  7. It works great with this code: vs.PythonExecute(str(vs.GetScriptResource('NameOfYourScriptInThisDocument')[1]))
  8. Old Topic, but I got a "situation" I would like to select the one and only "first selected" object, even if it's in a group or an viewport to change some attributes. The FSActLayer is working fine, as long as i dont want to use it IN group or IN viewport. Any idea?
  9. I would like to do the same. I'm testing the function vs.GetScriptResource('Nameofmyscript)[1]. If I run a Script like this: text = str(vs.GetScriptResource('Ebenenauswahl')[1]) vs.CreateText(text) I get all the text of my script. But if I want to use a name out of 'Ebenenauswahl' it says "name '...' is not defined. What am I missing?
  10. Do you have some parts of your network saved as a symbol? I did so, to make it easier to make changes in several objects, and most of the time this was the problem...
  11. I would like to have a look on how you create those things... could you please upload in VW2020 as well? In Switzerland VW2021 is not avaiable yet 🙂
  12. you could set a class by a node and control the color by class...?
  13. Hey DomC I'm using your awesome "Marionette_Schrift"-Tool to convert Text to export to CNC. I'm a bit confused - is your Node deleting the class named "0" (zero)?
  14. Hey Marissa Is this node avayable? I would like to put an object node to an specific point in the file, but it only works in 2D-View. If I'm in a 3D View it moves it always like "relative". So I would like to set to Plan View an restore the view that was before. Sounds like the thing you were explaning...
  15. I just realized a weird thing. If I connect an object with several record fields I got duplicates in the output. A Bug? It's easy to fix with a "Remove Duplicates" Node Wrong, If i want this object to move afterwards: And fixed:
  16. Is there anyone who could give me an idea how i could handle this?
  17. Hi Mi&D I am a cabinet maker, also from switzerland. Is this what you would like to have? Marionette-part2-start Rechtecktool_gim.vwx
  18. Hi It's because the type of your values from worksheet "string". I added a function node "eval(x)" and now it works. is this what you where looking for? AddList_Debug_gim.vwx
  19. Version 1.0.0

    95 downloads

    Wrappers in German, to align objects with defined Distance. Not sure if there are some bugs - let me know 🙂
  20. Oh I see... oops, get more complicated than i thought... I would like to use it on groups too, so probably something this way?Align Distance_20-06-13-gim.vwx
  21. Hi MRoth Have you been successfull? I'm looking for some really similar. It looks to be difficult to get the selectet objects IN a group while working IN this group...
  22. Didn't really work. I made a menu command, and the first rectangle jumped a bit instead of hold positon. But your changes gave me an idea, so i put in a filter to only work on the objects on same layer. first tests are working fine - will see Align Distance_20-06-08-gim.vwx
  23. Hello everybody I tried to create a tool which allows me to align any object (2D, 3D, viewports). So i made a network an it kind of works - as long as i dont try to get object by "selected" an use it as a marionette command. where's my blind spot? Align Distance_20-06-08.vwx
  24. Or, another example to show what i would like to get. An invisible OIP widget for control points would be a good beginning. is something like this possible?
×
×
  • Create New...