Jump to content
Developer Wiki and Function Reference Links ×

Concatenate variables into text _ Marionette


Raph

Recommended Posts

Hello Raph,

 

i'm sorry, i seem to have changed the code of the "concat" node without remembering.

It should work if you change the code of the "concat" node to:

@Marionette.NodeDefinition
class Params(metaclass = Marionette.OrderedClass):
#APPEARANCE
	#Name
	this = Marionette.Node( 'Concat' )
	this.SetDescription( "Concatenates a list of strings." )
	
	#Input Ports
	stringIn = Marionette.PortIn('', 'listStrings')
	stringIn.SetDescription( "The input strings." )	
	
	#OIP Controls
	
	#Output Ports
	stringOut = Marionette.PortOut('s')
	stringOut.SetDescription( "The output string." )
	
#BEHAVIOR
	this.SetListAbsorb()

def RunNode(self):	 
	#inputs
	stringIn = self.Params.stringIn.value
	
	#script
	newString = ''
	for s in stringIn:
		newString = newString + str(s)
	
	#outputs
	self.Params.stringOut.value = newString

 

Unfortunately i cant post the vwx file because i just have an educational verison.

 

Regards,

Letti

Link to comment

Hi LEtti,

Hi Dom,

Hi everybody,

 

Thank you for your answers.


I wanted to change the text in the marionette node. But I have an error that appears. (see attached file)

As a result, no changes are made.


So I wanted to create a new marionette node.

But I can't do it!


Can you give me advice, tutorials or sources that show how I can create my own marionette nodes?


Thanks in advance

 

Raph

 

Capture_10_13_2022_102123.png

Edited by Raph
Link to comment

Hi everybody,

 

OK I found a solution.

I took a node that @DomC created and modified it

see attached file

 

Thank you for sharing your knowledge and helping me 😉

 

Now

I would really like to learn how to make my own nodes so my question remains.

Have you tips for learn to program in python for Vectorworks?

 

Many thanks in advance

 

Capture_10_13_2022_105843.png

Capture_10_13_2022_115639.png

Edited by Raph
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...