cancel
Showing results for 
Search instead for 
Did you mean: 

bundle typedef

rakornet
Member

bundle typedef

I created a typedef for a subVI and would like to have a bundle outside the subVI to use as input to the subVI.  I couldn't seem to find any way to create a bundle of the custom typedef type.  Right now, I am using a workaround:  I created a constant of the custom typedef type and then am using the Bundle By Name function.  This seems to work, but I would like to be able to get rid of the constant completely and just be able to build a bundle of the custom typedef type directly.  Is this possible?

 

Thanks

13 REPLIES 13
MikeS81
Proven Zealot

Re: bundle typedef

Hi rakornet,

sorry, i don't understand what you need. Can you please show a picture of your workaround and maybe one of your expected bundle?

 

Trying to help

Mike

oyester
Member

Re: bundle typedef

I create a subVI that does nothing but return a cluster set to whatever default values I have chosen. I then wire the output of the subVI directly to the bundle-by-name structure. This works for me but I admit it feels a bit kludgy. I too would be glad to see if someone has a better way.
MikeS81
Proven Zealot

Re: bundle typedef

Hi oyester,

do you want to set your values inside of the subvi? If yes, write all your values to your control, right click on it and select "make current values default".

 

Mike

Knight of NI

Re: bundle typedef

Message contains a hyperlink

There is no way to directly associate a Bundle or Bundle By Name function directly to a typedef. The source of the middle input on those functions has to come from someplace. This can be a cluster constant that's made from a typedef, or it can be the output of a subVI that return the typedef cluster.

 

If you wish, you can suggest this as an improvement in the Product Suggestion Center

oyester
Member

Re: bundle typedef

Message contains an attachment
I suppose it's easier just to give an example. So here it is.
oyester
Member

Re: bundle typedef

Message contains an attachment
sorry, I needed to add three  more files. here they are
Highlighted
Knight of NI

Re: bundle typedef

OK. What is this code supposed to show? Are you trying to eliminate the "outputs default cluster" VI? If so, I've already given you the answer: you can't.
oyester
Member

Re: bundle typedef

Its an example of your second suggestion.
Knight of NI

Re: bundle typedef

OK