Jump to content

Gregi

Member
  • Posts

    55
  • Joined

  • Last visited

Everything posted by Gregi

  1. I guess you could create any master-object which is connectet to a database an name it. in your marionette you get this object by name an gets its database entrys. If your master-object is a symbol with symbol-text you have a "Master-Table" or something like that.
  2. I'm really thankfull to this post! I'm doing a lot of try and error, but it works pretty fine! 🙂 I guess, a simple open and close the Editing-Window in the PlugIn Manager is working as well..
  3. Is there a way to replace the code inside a Marionette node? I have a lot of self-made nodes and they are used in several Marionette-Objects. Now, I made some changes ("updates") and would like the put them to all those nodes. Any other way instead of open the Objects and replace the code manually would be great... Great thank to any idea 🙂
  4. i do have the same problem. I have a lot of Marionette-Objects, saved as red symbols. Since I installed VW2021 i have a huge load of issues and VW crashes. If i want to reconstruct this, VW2020 crashes to. demotivating any idea? some changes in python?
  5. Is there any way to create a function like "SectionSolid" in the function reference to do what i like? Who is able to implement those functions? or is it already there but just not on the reference page?
  6. Hi @Tbai I think this is what you need? In my test it returns true, if the PSet was connectet and false, if it wasn't 2021-01-13_Del IFC Property Set_gim.vwx
  7. Those are greate Nodes, but as soon as I want to use them in an Marionette Object its no longer working 😞 Is there any workaround?
  8. Is this what you are looking for? I do not work with the IFC-Data-thing, but think it should work. 2021-01-09_Del IFC Entity_gim.vwx
  9. Oops, I should have searched in the Gallery too... Thanks!
  10. Hi everybody I have some Marionette-PIOs saved as "red" Symbols. I would like to import them to another more complex Marionette PIO and change some Parameters. Is there a way to get the Parameters like the custom objects? How do i get the Handles to my parameters?
  11. Version 1.0.0

    17 downloads

    It got struggled by using one "tool" to subtract from more than one Objects. This Node is fixing it. You can use Solid Boolean V3 in situations, where you want to use the same hObj2 ("tool") for more than just one boolean. It creates a copy of the Object and deletes it at the end of network ("vs.Marionette_DisposeObj()")
  12. It works when i put my code in a "Button-Node" an run as the button script, then the PIO is still there 🙂
  13. Hi everybody I would like to create a Symbol definition as a copy of the Objects in a PIO. I made a node which is working if testing as a network or a wrapper. But as soon as i put it in my PIO, the PIO will go away, but i have the symbol. Any ideas? and the code of my "Create Symbol"-Node: #gim 2020-12-24 #Revised 12/21/15 MFarrell #Modified by MFarrell May 2017 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "Create Symbol" ) this.SetDescription( "Fügt ein Symbol im gewünschten Ordner ein" ) #Input Ports sym = Marionette.PortIn( '', 'sName' ) ordner = Marionette.PortIn( '', 'sOrdner') sym.SetDescription( "Name of symbol." ) obj = Marionette.PortIn(vs.Handle(0), 'hObjs') # p = Marionette.PortIn( (0,0), 'p' ) # p.SetDescription( "Coordinates of symbol insertion point." ) # angle = Marionette.PortIn( 0, 'nAngle' ) # angle.SetDescription( "Rotation angle of symbol, in degrees." ) #OIP Controls #Output Ports h = Marionette.PortOut() # h.SetDescription('Handle to Symbol object') #BEHAVIOR # this.SetLinksObjects() this.SetListAbsorb() def RunNode(self): #inputs sym = self.Params.sym.value[0] ordner = self.Params.ordner.value[0] obj = self.Params.obj.value if type(obj) != list: obj = [obj] #script vs.SetOriginAbsolute(0, 0) vs.BeginSym(sym) for x in obj: objn = vs.CreateDuplicateObject(x, None) vs.Marionette_Dispose(x) vs.EndSym() symbol = vs.LNewObj() #wenn noch nicht vorhanden, Ordner erstellen if ordner != '': if vs.GetObject(ordner) == None: vs.NameObject(ordner) vs.BeginFolder() vs.EndFolder() place = vs.GetObject(ordner) vs.InsertSymbolInFolder(place, symbol) #outputs self.Params.h.value = h
  14. Thanks to @m.graf, this works great. I made an example: I just took the original "set layer" node end changed the Layer OIP-Control to an Input-Control. If you put this to your end of network (in Wrapper) it works great! 2020-12-24_ungroupatend_gim.vwx
  15. Ooops, did'nt testing this situation... Sorry, no solution (yet). Maybe I got a good idea while sleeping 🙂
  16. 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...
  17. 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
  18. 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):
  19. 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
  20. 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
  21. 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()
  22. It works great with this code: vs.PythonExecute(str(vs.GetScriptResource('NameOfYourScriptInThisDocument')[1]))
  23. 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?
  24. 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?
  25. 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...
×
×
  • Create New...