Jump to content

Gregi

Member
  • Posts

    65
  • Joined

  • Last visited

Everything posted by Gregi

  1. I did many tests with ResetObject and similar without succes. Now i got a workaround with exporting to symbol, so you can edit the symbol, and then there's another button to re-import the symbol which replaces the GetCustomObjectProfileGroup. It is not as Nice as i would like to have it, but right now it works.
  2. Thanks for your inputs I guess my explanation was not exact 😉 I would like to make it possible to edit the drawing by users. So like "edit Symbol" or "edit group", where VW shows the drawing with the yellow frame, where you have to exit the drawing by clicking "exit..." I'm able to do so as long as i hit the button on the instance (not within the "edit style" window) - but after exit i have to re-open the document to see any of my PIO...
  3. Hi @MullinRJ Thank you for your reply. For sure, i did a lot of trying of those two functions 🙂 I put both of them in my script and comment / uncomment. But the vs.vsoGetPluginStyleSym() is always crashing VW. I was wondering, why vs.GetPluginStyleSymbol needs two inputs (in the function reference it says: vs.GetPluginStyleSymbol(hObject, hSymDef)) but it works in this way: bisStyled, StyleSym = vs.GetPluginStyleSymbol(gPio_H, None) #Prüfen, ob PluginObjekt Stilgesteuert ist It is hard to get any information about some functions, especially in combination with event-based PIOs. Probably the "vso"-Function is only meant to work in a special event-case? Gregi
  4. Yes, this is exactly what I'm doing. But i struggle in editing my Profile Group. Which handle, or which function, would you recommend to edit my object? (instead of EditObjectSpecial)
  5. I'm struggling with integrate a drawing into my styled PIO. My PIO is using this drawing as the basis to create the object. So this drawing should be a "parameter", invisible in the end, but not deleted. If I could have a look how it works with the title block as an example, this would maybe be a lot of help 🙂 On my way to look for a solution i created a 2D-path-object, so the profile group is my "base". The PIO is working good, but there are (at least) two things not working: to edit the profilegroup i created a button. It works, but after i left the "edit group", i have to close and re-open the document to see any of my PIO #Konstanten Event kParametricRecalculate = 3 kOnObjPref = 4 kObjOnInitXProperties = 5 kObjOnDoubleClick = 7 kObjOnObjectUIButtonHit = 35 kObjOnWidgetPrep = 41 kObjOnEditPluginStyle = 60 kObjCreatePluginStyle = 61 kObjUpdatePluginStyleObject = 62 kObjFinalizeCreateStyle = 63 kObjFinalizeUpdateStyledObject = 64 kObjStyleWidgetChosen = 65 nachAbschlussStilbearbeiten = 81 # 70? # 82? # 85? ButtonIDObjektBearbeiten = 1234 (theEvent, theButton) = vs.vsoGetEventInfo() (ok, gPio_N, gPio_H, gPioRec_H, gWall_H) = vs.GetCustomObjectInfo() if theEvent == kObjOnInitXProperties: #5 ok = vs.vsoAppendWidget(kWidgetButton, ButtonIDObjektBearbeiten, 'Objekt bearbeiten...', 0) #Button hinzufügen vs.SetObjPropCharVS(kObjXPropEditGroup, vs.Chr(kObjXPropEditGroupProfile)) #mit Knopf wird direkt Profilgruppe bearbeitet if theEvent == kObjOnObjectUIButtonHit: #35 if theButton == ButtonIDObjektBearbeiten: vs.EditObjectSpecial(gPio_H, 4) the button only works to edit my profile-group "by instance". I could not find a way to edit the group within the style OIP. Even if i would find a way to edit the instance-group an then move the drawing into the style (by script), there would be no way to do so by right-click the red-symbol in the resource manager what am i missing? is there any documentation? or a way to get the source-code of any "scripts by vectorworks" which are not in sdk?
  6. Hello I'm working on a PIO with Styles. The PIO is a path object, so there's a profile and a path-group. If i would like to get the profile group "by style", i need a way to change the profile in the symdef - but how? I think it has to be done with one of those functions, but what's the difference between those two? def vs.vsoGetPluginStyleSym(): return hSymDef def vs.GetPluginStyleSymbol(hObject, hSymDef): return (BOOLEAN, hSymDef)
  7. I had some trouble in trying this, but id didnt work. maybe come back to this point later in my project. But as long as it works this way, im happy with it 😉
  8. Hello everybody So, almost a year has gone... so I got the "Style" thing a little bit of working, but not in the way i would like to. To have my Button in OIP AND in plugin-style-dialog is ok, i managed to do so How do I manage to have a pick-box to this button (better: the drawing behind it) in the settings? (screenshot) which way would you recommend to have a drawing object inside my PIO? I started with an 2d Path Object, to have the profile-Group for this. The Button just handles to "Edit Profile-Group" If i set the parameters "by style" the fields in OIP are grey (like expected), but on doubleclick i get the handles and if i edit the form, i can change those parameters by instance. to bring them back to "style" i have to open "edit style" an close. do i have to include an override in my code, like "if this param is set by style, copy param from style-sym-def"...? is there any "good" list of event constants anywhere (Appendix or similar)? it is a lot of work to search "all" the stuff about event handling, but it sounds really interesting to work with those things
  9. hello everybody this is really helpful. I'm trying to create my own styled PIO. It works kind of good, but there's one thing i still don't get: I would like to "implement" an Object in the style, like the profile of my 2D-Profile-Object. Is there a Way to "easy" Add a Buton on the "kEditPluginStyleDefault" thing? I tried "AddToPluginStyle" and/or "AddToPIOStyleEdit" with no succes - but i don't know in which part of Event-Trigger i would have to pack anything i couldn't get any information about how drawn objects can be a part of a style, maybe @_c_ does have any idea because of the great things from vectorlab? 🙂
  10. Gregi

    Merry Christmas!

    Haha great! funny video, thanks a lot 🤣
  11. 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.
  12. 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..
  13. 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 🙂
  14. 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?
  15. 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?
  16. 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
  17. 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?
  18. 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
  19. Oops, I should have searched in the Gallery too... Thanks!
  20. 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?
  21. Version 1.0.0

    29 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()")
  22. It works when i put my code in a "Button-Node" an run as the button script, then the PIO is still there 🙂
  23. 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
  24. 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
  25. Ooops, did'nt testing this situation... Sorry, no solution (yet). Maybe I got a good idea while sleeping 🙂
×
×
  • Create New...