05-16-2015 05:35 PM - edited 05-16-2015 05:36 PM
Sometimes NI doesn't follow their own recommendations.
For instance making common structures/parameters type definition.
My example today is taken from the Picture Functions palette:
As I was revisiting some old VIs of mine, I found a funny looking icon with a red cross (Draw Rect.vi). This turned out to be a deprecated VI, now replaced by Draw Rectangle.vi.
Replacing it was painless, but I noticed a coertion dot on my nearby Draw Oval,vi input and, looking into it, I realized that the "pen" cluster (the constants shown on the figure above) had different "Width" types.
Since all these functions call Set Pen State.vi, which uses a U16 Width, it would make sense to have all widths of that type. However, for rectangles, the old and new functions use a I16 Width parameter (within the "Pen" cluster).
They appear to be the only one to use this version of the Pen cluseter. In particular, the Draw Round Rect.vi does use the U16 type.
Tested in LV 2013 SP1 64 bits
05-16-2015 06:01 PM