Dynamically renaming pins of a pin collector

 

Is there a known way of dynamically changing the name of a pin on a pin collector other than right clicking and renaming it manually?


My use case is to dynamically add or remove values to a dropdown list based on other parameters being true in my composition. 


I can't see an obvious way to do it but it would be very powerful!

   Cookseyyyyy

 
Profile Image
Cookseyyyyy
  -  

Just to add to this, I can see modules for "Auto name", "Set Text Pin" and "Auto Pin Name".


Would these perform some kind of function here?

 
Profile Image
Eifert@Aximmetry
  -  

Hi,

I guess you are already using $Enum to create drop-down lists: https://my.aximmetry.com/post/85-set-min-max-value-for-sliders-and-inputs
In that case, you want to use the Auto Pin Name module.
The Auto Pin Name module can rename the Pin Collector's pin:

You will probably want to use the Text Concat Multi module to add the dropdown list items to the Name text ("&Enum,Name,...").

Auto Name can dynamically give a name to the compound itself. The compound must be within another compound.

Set Text Pin can change the value of a Text pin. Like it could change the text of a Text Image module without being connected to it.

Warmest regards,


 
Profile Image
Cookseyyyyy
  -  

That's super helpful, thanks a lot.


I am using $Enum indeed, we are essentially switching between different variants in UE which this is going to be really helpful.


For reference then the 'Module' field just has to match that of the pin collector in the same compound for it to work?

 
Profile Image
Eifert@Aximmetry
  -  

Hi,

Yes, the 'Module' field has to be the same as the Pin Collector's name. And they have to be in the same compound:

This is one of the reasons why you can not have nodes (modules, compounds) with the same name in one compound.

Warmest regards,

 
Profile Image
Cookseyyyyy
  -  

Just adding a note here (mainly for myself later!). I couldnt get this to function when I had only populated the Name field of the auto pin name module directly.

However when I hooked it up to a text block or txt etc it worked fine. Not sure why that would behave that way but not an issue.

 
Profile Image
Eifert@Aximmetry
  -  

Hi Cookseyyyyy,

You might have first given the Name text pin then the Module or Pin Index.
Auto Pin Name only updates the pin name when the Name pin changes (even if you edit it in the Pin Values panel), it won't update it when Module or Pin Index changes.

Warmest regards,