Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/25/2023 in all areas

  1. I exclusively use the bundle/unbundle, unless I am not able to for example if accessing a field in a parent class. Accessors should be, in my opinion, only for when you want to get access to the data from outside the class, and even then you should really think about if this is strictly necessary. Often you can get rid of accessors by having a better designed API (methods). Lots of sets/gets is a code smell to me.
    1 point
  2. No, don't pass LabVIEW arrays straight to the cluster! They are different entity than those in C/C++. In order to match your struct definition, you have to turn each array into a separate cluster. Use Array To Cluster primitive for that. RMB click -> Cluster size on it allows you to specify the output cluster size. Then bundle all the clusters into one (plus three int parameters), then pass that resulting cluster to your CLFN. I assume, you know your .so's calling convention. Oh, I forgot to add, that Array To Cluster node doesn't accept more than 256 elements. So, if SV_STRING_SIZE is 512, you need to make a pairs of 256+256 elements (e.g., two "id" clusters, two "vendor" clusters etc.). There's another way with DSNewPtr+MoveBlock, but it's a bit more advanced.
    1 point
  3. I ran into a situation where I really needed a rotated column header for a table due to having long column header names and not enough space. After doing a bunch of looking around, it didn't really seem like this capability existed anywhere for LabVIEW, so I'm sharing a little piece of code that I created for this here. LabVIEW doesn't natively support rotated strings, so that wasn't an option. LabVIEW 2D picture controls would theoretically let you write, and then rotate text. But LabVIEW 2D picture controls don't support aliasing, so I didn't perceive this to be an option. @hooovahh recently posted a fun .NET picture control library to VIPM, and that inspired me to go down the .NET picture control rabbit hole. Having to deal with opening and closing all the .NET references is a bit of a hassle, but I'm surprised by how much capability exists with the .NET picture control. High complexity ceiling. Looking back, I wonder if I should have tried the LabVIEW 3D picture control instead. Anyways, this demo provides the following capability: - rotated column headers by specified angle - anti-aliased text - column headers size to table column width/positions RotatedColumnHeader.zip
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.