Jump to content

KingChaos

Member
  • Posts

    293
  • Joined

  • Last visited

Posts posted by KingChaos

  1. this told me CHATgpt

     

    @Marionette.NodeDefinition
    class Params(metaclass=Marionette.OrderedClass):
        # APPEARANCE
        # Name
        this = Marionette.Node('Delete')
        this.SetDescription(
            'Deletes an object if the condition is met.\nNote: Objects to be deleted are saved in a list and are deleted at the end of the network execution. So, there is no risk of referencing an object that no longer exists'
        )

        # Input Ports
        obj = Marionette.PortIn(vs.Handle(0), 'hObj')
        obj.SetDescription('The object to delete')

        delete_flag = Marionette.PortIn(False, 'DeleteFlag')
        delete_flag.SetDescription('Boolean flag to decide whether to delete the object or not')

        # OIP Controls

        # Output Ports

        # BEHAVIOR
        def RunNode(self):
            # inputs
            obj = self.Params.obj.value
            delete_flag = self.Params.delete_flag.value

            # script
            if delete_flag:
                vs.Marionette_DisposeObj(obj)

            # outputs
     

  2. Hi,

     

     

    i made some kind of rastered dowels for my cabinets, because the cabinetcreator of IC does not allow applying dowels in backplates.

     

    So i made this small marionette to have a red symbol which can be placed as a "box object" in the cabinets which is adoptable to the cabinet measures.

     

    network run - works

    wrapping - works

    object node - works

    symbol of "object node" - VWX CRASH

     

    does someone knows, whats wrong with my network?

     

     

    BR KC

    Duebelmarionette als Boxobjekt forum.vwx

  3. i want to make an object node, which places red symbols like this

     

    image.png.e05beee8f51658d1b03f918d0309465b.png

    behind each segment of a named polygon.

     

    i need to put the segments length into the red symbols.

     

    with xg cabinets its working very good, except some unwanted behavior.

     

    Therefore i read out the "record" of the red symbols and found

     

     

    image.thumb.png.cf2c612b1c19b0e527642a05465d5dd5.png

     

    but it seems, that there are no fields with the data i need.

     

     

    So i need to remake the red symbol to make it be dynamic with a database?

     

    The red symbol is not that easy. You saw it before.

     

     

    But i dont know how to make the symbol react like now AND having a record with all the oip inputs.

  4. i needed the name of the field, because it seems not to be the name i called the input node which is in the oip.

     

    is there any different way, to manipulate the OIP parameters of marionettes placed red symbols?

     

    i thought they were record based, maybe this is not the right way to do it.

     

     

    symbole am strang V2.vwx

  5. ah ok, i made it with chatGPT.

     

    @Marionette.NodeDefinition
    class Params(metaclass = Marionette.OrderedClass):
    #APPEARANCE
        #Name
        this = Marionette.Node( "Get Record Name" )
        this.SetDescription( 'Returns the value of a data record field. If the data record does not exist or is not attached, it returns false' )

        #Input Ports
        inObj = Marionette.PortIn( vs.Handle(0), 'hObj' )
        inObj.SetDescription( "The input object" )
        

        #OIP Controls

        #Output Ports
        obj = Marionette.PortOut('hObj')
        obj.SetDescription( "The original object" )
        recName = Marionette.PortOut('sRecName')
        recName.SetDescription("The name of the attached record")

    #BEHAVIOR

    def RunNode(self):
            # functions
            def getRecName(objHan):
                # This function returns the name of the first record attached to ObjHan, else an empty string
                totalRecCount = vs.NumRecords(objHan)
                if totalRecCount > 0:
                    locRecHan = vs.GetRecord(objHan, 1)
                    locRecName = vs.GetName(locRecHan)
                    return locRecName
                return ''

          # inputs
            inObj = self.Params.inObj.value

            # script
            recName = getRecName(inObj)

            # outputs
            self.Params.recName.value = recName
            self.Params.obj.value = inObj

     

    it returns 1 record name.

     

    i failed to add an output with a list of the field names of this record.

     

    Then i tried to list all attached records, but that does not work too.

     

    😞

  6. hi,

     

     

    how i can call the record name of a red symbol, placed with a marionett network.

     

    i need to place red symbols and put some parameters into them.

     

    Which nodes i have to use for this?

     

    BR KC

  7. if i have a network which places cabinets along a polygon, behind each segment 1 cabinet.

     

    in the OIP i need for each segment popups for the (red) symbol to select which has to be there, i dont know how i only got the popups in the same count as the polygon segments has.

     

    Also wenn das Polygon 5 segmente hat, brauche ich auch nur 5 popups zum auswaehlen des symbols.

     

    Momentan habe ich das hart eingebaut, dass ich immer 6 segmente habe.

  8. i manipulated the code of the node (after i consulted ChatGPT) to get an input port and i tried to output the n-th element of the list i inputted.

     

    This works so far, except the selection is not "changing its selection choicenames" i think it has somethin to do with behaviour and run node complications.

     

    2. if i wrap it, the named node is in the oip palette as a parameter.

     

    image.png.ab4ea69d970b9905a051b2271eb9f337.png

     

    the outputstring has to be cleaned so the 2 ' has to be removed.

     

    Maybe someone has a clue, why the hack this is not reacting like i think it "shoud".

  9. Hi,

     

    i got an "Object node" made by a marionette. It has the inputports of all named input-nodes in the marionette wrapper.

     

    so far so good.

     

    is there any Way to make the not needed Inputports diasappear?

    f.E. i got 3 pulldown inputselectors. After selecting the first pulldownoption, some other in pulldown 2 should not be "pickable" or make the third input disappear?

     

    can this node be somehow valved or anything else?

     

    BR KC

  10. is it possible to manipulate a text in the following way?

     

    i got 2 texts well oriented and placed.

     

    image.thumb.png.28b678721260db67e9708e0079cab14c.png

    fE "RB_2" is a text located at the startpoint of a polygon segment. the 800 is located in the middle of the same segment.

     

    How can i make the 800 is placed under RB_2 like in a second line like u do if u press enter while typing a text?

     

    Becaus of the location and orientation of the polygon its not possible to move it -y. It has to be like in the second line, however die polygon is located in the room.

     

    it can possible, that the polygon is looking like this. so i think i have to set the textproperties to a multilinetext. Best would be the "Numbers" are written in red and the strings in black.

     

    image.thumb.png.871395c74e04e29f2e830790fc158afb.png

     

    br KC

  11. if u name it u can have it in the ObjectInfoPalette of your marionette/wrapper/object-node

     

    If that is what u need, try it.

     

    I am 1 step further, i need the selection of symbols (in a specific folder) with pulldown in the oip 🙂 

  12. #Modified April 2017 Made by CHAT Gpt with Kingchaos
    @Marionette.NodeDefinition
    class Params(metaclass = Marionette.OrderedClass):
    #APPEARANCE
        #Name
        this = Marionette.Node( 'Popup String' )    
        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.')
        
        #Input Ports
        
        #OIP Controls
        input = Marionette.OIPControl( 'Popup', Marionette.WidgetType.Popup, 0, ['US-Endseite Preback RB V002', 'US-3er SK Dummymaterial SST Preback RB Koemacell V00', 'US-Doppeltuer Dummymaterial SST Preback RB Koemacell V00', 'US-Drehtuer Dummymaterial SST Preback RB Koemacell V01', 'US-Einzeltuer m BL Dummymaterial SST Preback RB Koemacel V00'])
        input.SetDescription('an OIP control representing the options designated within the script editor')
        
        #Output Ports
        output = Marionette.PortOut('s')
        output.SetDescription('a string representing the option selected in the OIP..')
        
    #BEHAVIOR

    def RunNode(self):
        #inputs
        input = self.Params.input.value
        
        #script
        options = ['US-Endseite Preback RB V002', 'US-3er SK Dummymaterial SST Preback RB Koemacell V00', 'US-Doppeltuer Dummymaterial SST Preback RB Koemacell V00', 'US-Drehtuer Dummymaterial SST Preback RB Koemacell V01', 'US-Einzeltuer m BL Dummymaterial SST Preback RB Koemacel V00']
        selection_index = int(input) # convert the string input to an integer index
        selection = options[selection_index] # get the corresponding option

        #outputs
        self.Params.output.value = selection
     

    • Like 1
  13. On 5/24/2024 at 7:53 AM, DavidF said:

    I'm looking for something similar. I would like to have the list choices in the pop-up dialog as a drop-down menu in the object info. Is it possible?

    does the "Popup" node not do what u need?

     

    The question here ist, what should be the output? The std. Node Popup outputs 0,1,2,3,4, depending on what coice u picked.

     

    i modyfied this node with help from "chat gpt" so i got a node outputs the input as a string u selected.

  14. i would like to have an oip port in my existing marionette, which has a pulldown out of this selection.

     

    so i need a pulldownnode which

     

    SelectObj(INSYMBOL & INVIEWPORT & ((T=POLY) & (N='*Poly*')));

     

    and outputs the name of the selested polyline as a string.

     

    someone has a clue, how to combine the filterselection with nodes?

     

     

    BR KC

×
×
  • Create New...