KingChaos Posted February 4, 2022 Share Posted February 4, 2022 Hi there, I am genereting some parametrical steel/alu/stainless steel parts with database entries with "sales info". to ensure our draftsmen can only use restricted material AND sizes of this material (in this case metalworks -> stainless steel, crude steel, steel sheets etc ) i need some kind of popup, which is driven by some chart, where i can input the suppliers materials & dimensions. The user has to pick out of a popup: 1. kind of Material (sheet, L profil, T profil, rect. tubes, circle tubes ) -> we only have 1 supplier he can supply the lists out of his "shopping cart" 2. the dimension (w,t,l) 3. Coating/finishing manuel input has to be: 4. Name of the part 5. information 4 & 5 must get into the database "Schlosserei - Bauteilinfo" in the fields. For now i am seeking a way to put exceldata into a VW chart which drives the popup names and parameters. Later on will need some additional help. Some stuff is working well, maybe with too complicated nodes, but i think its working. In the end i think i need a profilesymbol with a polyline for each profile we use and the popup 1. will pick this symbol and then extruded into the length needed. But the 1. step is too hard for me too take it alone, maybe someone knows what i am planning and can help me with the popups. br KC Quote Link to comment
KingChaos Posted February 7, 2022 Author Share Posted February 7, 2022 (edited) Now i proceed with the database stuff und now i THINK I HAVE to Edit the Node "Custom Popup" in such a way, that i have the: - "choice 1" made out of "Cell A2-A5" in my spreadsheet "Stammdaten Handelshof Materialauswahl" - "Choice 2" made out of the Cell in Column M (dimension) in my spreadsheet "Stammdaten Handelshof Rechteckrohr" where Column G (material type) has the same value als Coice 1. Is there any way to do this so or different? #DomC @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "Custom Pulldown" ) this.SetDescription( 'A Dialog with 3 Popups') #Input Ports sDialog = Marionette.PortIn('Dialog Name') sTitle1 = Marionette.PortIn('Materialtyp:') lPopup1 = Marionette.PortIn([],'{Stammdaten Handelshof Materialauswahl->A2:A5}') sTitle2 = Marionette.PortIn('Querschnitt:') lPopup2 = Marionette.PortIn([],'choice2') sTitle3 = Marionette.PortIn('Title 3:') lPopup3 = Marionette.PortIn([],'choice3') iWidth = Marionette.PortIn(40) #OIP Controls text = Marionette.OIPControl( 'Text', Marionette.WidgetType.Text, '') text.SetDescription( 'Dialog user prompt string' ) #Output Ports sPopup1 = Marionette.PortOut() sPopup2 = Marionette.PortOut() sPopup3 = Marionette.PortOut() sPopup1.SetDescription( 'The Result of the Popups' ) #BEHAVIOR this.SetListAbsorb() def RunNode(self): #inputs DialogName = self.Params.sDialog.value[0] title1 = self.Params.sTitle1.value[0] title2 = self.Params.sTitle2.value[0] title3 = self.Params.sTitle3.value[0] pop1 = self.Params.lPopup1.value pop2 = self.Params.lPopup2.value pop3 = self.Params.lPopup3.value width = self.Params.iWidth.value[0] numPopups = 3 #script def Dialog_Handler(item, data): for i in range(len(pop1)): vs.AddChoice( self.dialog, 11, pop1[i], i+1 ) for i in range(len(pop2)): vs.AddChoice( self.dialog, 12, pop2[i], i+len(pop1)+1 ) for i in range(len(pop3)): vs.AddChoice( self.dialog, 13, pop3[i], i+len(pop2)+1 ) self.v1 = vs.GetItemText( self.dialog, 11 ) self.v2 = vs.GetItemText( self.dialog, 12 ) self.v3 = vs.GetItemText( self.dialog, 13 ) def CreateMyDialog(): self.dialog = vs.CreateLayout( DialogName, 0, 'OK', 'Abbrechen' ) dialog = self.dialog vs.CreateStaticText(dialog, 1, 'title1', width) vs.CreateStaticText(dialog, 2, 'title2', width) vs.CreateStaticText(dialog, 3, 'title3', width) vs.CreatePullDownMenu( dialog, 11, width ) vs.CreatePullDownMenu( dialog, 12, width ) vs.CreatePullDownMenu( dialog, 13, width ) vs.SetFirstLayoutItem( dialog, 1 ) vs.SetBelowItem( dialog, 1, 11, 0, 0 ) vs.SetBelowItem( dialog, 11, 2, 0, 0 ) vs.SetBelowItem( dialog, 2, 12, 0, 0 ) vs.SetBelowItem( dialog, 12, 3, 0, 0 ) vs.SetBelowItem( dialog, 3, 13, 0, 0 ) vs.RunLayoutDialog(dialog, Dialog_Handler ) CreateMyDialog() #outputs self.Params.sPopup1.value = self.v1 self.Params.sPopup2.value = self.v2 self.Params.sPopup3.value = self.v3 BR KC Edited February 7, 2022 by KingChaos Quote Link to comment
KingChaos Posted February 7, 2022 Author Share Posted February 7, 2022 (edited) @Marissa Farrell @DomC @SimA Have you some idea, how i can solve this? My skills in coding/scripting is limited, so i wont make the change in the node by myself, if no one helps me. 🙂 Maybe u have a better way to get a popup out of a spreadsheet, this was my first thought, maybe its totally wrong. br KC Edited February 7, 2022 by KingChaos Quote Link to comment
SimA Posted February 7, 2022 Share Posted February 7, 2022 11 hours ago, KingChaos said: better way Hallo KingChaos Als Schreiner kann ich dir kaum behilflich sein. Wenn du jemand findest, der dir einen Popup-Knoten mit einem Eingang baut, dann kannst du die Werte aus einer Tabelle abrufen. Wenn du einen bekommst, ich bin auch ein Abnehmer dafür. Mein Bild im Anhang ist zusammengebastelt. Es zeigt lediglich meine Die zu deinem Wunsch. Gruss 1 Quote Link to comment
KingChaos Posted February 8, 2022 Author Share Posted February 8, 2022 if that works great plan, but how to get the next choice out the sectionmeasures and how it will read out the artikelnummer? The File i made is working now good but the selection is missing. I got a steel profile: - chamfered/rounded or not - hollow or not - with drillings/copunterdrillings - controllable side of counterdrillings - controllable stop and and measure of the drillings, - drilling diameters - miter on both edges - the piece is named with length measure in the name (name is in a databasefield) - has an article number - has material text - infotext for drillings, counterdrillings, miters automatically and addeable informationtext. - you can rotate the object Maybe you have some more ideas or destroy my plan while u think the stuff is too slow because my spaghetticode slows die program down. 🙂 I will now: apply texture -> into coating databasefield. I really need the popup, because THEN is can make ALL these metal parts in just 1 file and i can morph them with parameters. in the end i need some achorpoints for the next steel part at the top and in the middle, so i can build them together with another marionette to have real parametrical Shelf for Tego. what do u think? I think its worth the hours i worked (8 h so far) on, because later all my collegues cant pick a wrong steel/alu part if the popup works and they never have to layout them because all u can read out with stamps. BR KC ProfilGeometrieRechteckBohrungen_V4.vwx Quote Link to comment
KingChaos Posted February 8, 2022 Author Share Posted February 8, 2022 @m.graf you have a solution for this? Quote Link to comment
SimA Posted February 8, 2022 Share Posted February 8, 2022 12 hours ago, KingChaos said: wie kann man die nächste Wahl aus den Abschnittsmaßnahmen treffen und wie es die Artikelnummer vorlesen Die beiden String's werde ich durch Popup Knoten ersetzten und dort die Vorauswahl definieren. Die Herstellernummer hohle ich durch das Abgleichen der Spalten eins und zwei. Der index ergibt dann zum Beispiel 0, 5, 13 und 3, 5, 21. Die Überschneidung von Index 5 ergibt mir anschliessend die Zeilennummer (Is Member). Anschliessend musst du nur noch die entsprechnnde Zelle abrufen. I will replace the two strings with popup nodes and define the preselection there. I get the manufacturer number by comparing columns one and two. For example, the index is 0, 5, 13 and 3, 5, 21. The intersection of index 5 then gives me the line number (Is Member). Then all you have to do is call up the corresponding cell. 1 Quote Link to comment
SimA Posted February 8, 2022 Share Posted February 8, 2022 Den Popup Knoten bitte mit Integer und String Ausgabe ausstatten. Please equip the popup node with integer and string output. 1 Quote Link to comment
KingChaos Posted February 9, 2022 Author Share Posted February 9, 2022 bahnhof ^^ Quote Link to comment
KingChaos Posted February 9, 2022 Author Share Posted February 9, 2022 btw das worksheet braucht ein handle, hat man mir gesagt 😛 Quote Link to comment
KingChaos Posted February 9, 2022 Author Share Posted February 9, 2022 hier ein marissa knoten, der vielleicht hilft get num rows.vwx Quote Link to comment
KingChaos Posted February 9, 2022 Author Share Posted February 9, 2022 so, nach einigem hin und her, hauts jetzt hin. Ich musste allerdings einmal "add 1" wegmachen. fehlt "nur noch der Popup" 🙂 Dabei bekomme ich Hilfe von einem anderen User. Quote Link to comment
SimA Posted February 9, 2022 Share Posted February 9, 2022 5 hours ago, KingChaos said: add 1 Der Index basiert auf 0 Die erste Zeile verwende ich als Überschrift +1 In der zweiten Zeile stehen die ersten Daten +1 Daher bei meinem Netzwerk add 2x Quote Link to comment
SimA Posted February 9, 2022 Share Posted February 9, 2022 9 hours ago, KingChaos said: marissa knoten Der Knoten zählt die Anzahl Zeilen und Spalten. Damit kannst du den Series Knoten füttern und die durchlaufet reduzieren. Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 so habs fertig 🙂 bis auf ein paar bugs, laeuft es. Wenn ich das als wrapper einsetze und die Teile aneinander baue habe ich wohl das "problem" dass der popup fuer jedes eingefuegte Teil abgefragt wird, da muss ich noch mal drueber nachdenken. heute nachmittag schieb ich den file hoch ok? dann kansnte dir das angucken. besonders gut finde ich, dass wenn du das als wrapper einbaust, das naechste teil zum positionieren einfach mit dem knoten des 1. verbindest und dann bleibt das 2. Teil auch am 1. sitzen, wenn du das verschiebst oder modifizierst in laenge und gehrungswinkel. Wenn ich ein neues PRofil brauche, muss ich also nur die tabelle modifizieren und habe sofort das neue teil im popup verfuegbar. Quote Link to comment
SimA Posted February 10, 2022 Share Posted February 10, 2022 1 hour ago, KingChaos said: das "problem" dass der popup fuer jedes eingefuegte Teil abgefragt wird Cool wäre, wenn der popup den letzten Wert verwenden und nur bei Bedarf in der Info-Palette via Dropdown verändert würde. Wer hat dir den Knoten gebaut? Ja, ich schaue gerne in deine Datei hinein 🙂 Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 ich habe selbst einfach das std popup benutzt. ich stelle nur gerade fest, das VW ab und zu abstuerzt. ggf. muss ich alles neu zusammenstopeseln und ein paar dinge, die ich oefter nehme wrappen, damit man durchsieht. Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 da ProfilGeometrieRechteckBohrungen_V7.zip Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 ein paar bugs hat es noch, muss guggn ob ich den nochmal zusammenbaue, sicherlich habe ich VIEL zu viele nodes und einiges SEHR umstaendlich berechnet. Ich kann also ueber die performance noch nichts aussagen. 1 Quote Link to comment
SimA Posted February 10, 2022 Share Posted February 10, 2022 Cooles Teil, eine Verweis-Funktion mit Auswahlmöglichkeit der entsprechenden Liste! Wenn du den hWorksheed abrufen möchtest, kannst du den Knoten "Name" verwenden. So kannst du gleich den Zwischenschritt mit "Net Worksheet" weg lassen. Das Handling mit dem Popup stört mich einwenig. Ich würde die Auswahl in die Infopalette verbannen. So dopt das teil auch nicht bei jeder Änderung auf. "mein Wunsch" Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 ja genau das war auch so gedacht, weiss nur nicht wie das geht, ich bin ja ein marionetten nub Quote Link to comment
SimA Posted February 10, 2022 Share Posted February 10, 2022 Da fehlt nur noch der Input, und die Liste wird von Hand in den Knoten eingetragen. @MRoth kannst du weiter helfen? Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 das geht ja nicht, weil ich dann die liste nicht aendern kann ohne den popup zu aendern, der popup MUSS selbst in die tabelle gucken. 🙂 Quote Link to comment
SimA Posted February 10, 2022 Share Posted February 10, 2022 Das "gucken" bedeutet, dass die "Options" angepasst werden müssen... ich denke da an Import.list oder so etwas. #MRoth #V1.0 20200327 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Popup enhanced' ) this.SetDescription('This node displays a popup window and returns the index and string from the selection. The default settings must be changed in the code itself. ') #Options #_________Enter your values in the line below.__________ options = ['t1', 't2', 't3', 't4', 't5','t6'] #Input Ports dListItems = Marionette.PortIn( [], "listChoices") dListItems.SetDescription( "A list of items to go in the popup." ) #OIP Controls input = Marionette.OIPControl( 'Popup', Marionette.WidgetType.Popup, 0, options) input.SetDescription('An OIP control representing the options designated within the script editor') #Output Ports int = Marionette.PortOut('i') int.SetDescription('The zero-based index of the selection.') str = Marionette.PortOut('s') str.SetDescription('The string of the selection.') #BEHAVIOR def RunNode(self): #inputs int = self.Params.input.value options = self.Params.options #script str = options[int] #outputs self.Params.int.value = int self.Params.str.value = str Quote Link to comment
KingChaos Posted February 10, 2022 Author Share Posted February 10, 2022 da bin ich raus, vs und python scripten kann ich nicht Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.