![](https://forum.vectorworks.net/uploads/set_resources_20/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
KingChaos
-
Posts
293 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Articles
Marionette
Store
Posts posted by KingChaos
-
-
hi there,
chatGPT is not able to give me (not a programmer) a working code of the delete node, with an additional boolean input that decides wether to delete or not.
is that possible in general or does this somehow not work in this way?
BR KC
-
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
-
gibts da was neues zu @SimA
-
i want to make an object node, which places red symbols like this
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
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.
-
now its working, only few wires new connected and modified.
the only stuff is not working is the fact, that a named popup node dont show in the pio.
i think because i added in input port to this popstring to make a popup node which selects one of the named polygons in my file.
Maybe someone knows, how to avoid this.
-
all i wanna do is placing object nodes and modify the oip values, but this is generally not possible?
-
but this pass node i cant deactivate by condition?
-
i think best would be, i get a really good tutorial for "making nodes". sry for my lack of everything ^^
-
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.
-
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 = inObjit 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.
😞
-
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
-
lol nice
-
Yes sry it sounds strange, they have to be dynamically on/off with condition fE.
if i have a 1. selection what makes selection 2 invalide fE.
-
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.
-
a name node, manipulated with chtgpt, with an input, solved it in a way, thats its working now, but still is not avaiblae in the oip of the wrapper if i wrap it.
dont laugh about my speghetticode ^^
-
-
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.
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".
-
i found a node from aLandsberger, "get symbol from folder" that does exact this thing.
-
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
-
is it possible to manipulate a text in the following way?
i got 2 texts well oriented and placed.
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.
br KC
-
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 🙂
-
#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..')
#BEHAVIORdef 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
-
1
-
-
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.
-
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
delete node with bool check wether delete or not?
in Marionette
Posted
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