From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CL_eisenwr

Add Assert Set and Assert Map

Status: Declined

Declined for reasons listed in AristosQueue's replies

From trying to make a malleable VI for some set/map functionality, I cannot seem to find a good way to cause the VIM call to be broken for when the input is not a set/map. It would be helpful to have a Asset Set and Assert Map method added to the Assert Type palette for this. 

Related post 

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
3 Comments
AristosQueue (NI)
NI Employee (retired)

Just use the set or map operations with your input. Any non-set/non-map input that tries to wire to those functions will fail. You don't need an assert.

AristosQueue_0-1581711276660.png

Asserts are almost never needed in writing VIMs. For some really generic operations, they have value, but usually, just do your operation.

AristosQueue (NI)
NI Employee (retired)

For examples... see the Sets and Maps palettes (respectively). They both have VIMs that operate on sets or maps (respectively)... none of them use assert nodes.

Darren
Proven Zealot
Status changed to: Declined

Declined for reasons listed in AristosQueue's replies