#191 nHaystack BHDict constructor / zinc-encoded string from tags array

Christian Tremblay Wed 9 Jul 2014

I would like some help about the good way to generate haystack tags on a point.

BHDict can use a zinc-encoded string but I lack some documentation about the good way to generate a zinc-encoded string.

My goal : take an array of tags (ex. discharge air temp sensor axAnnotated) and generate tags with a program on a point. For the moment, I would work only with markers.

Mike Jarmy Wed 9 Jul 2014

What you can do is just use the BHDict Field Editor in workbench, and put some marker tags on a point and see how they get written to zinc. You'll note that the tags tend to get written out in a "random" order.

You don't have to try to duplicate the order though, its fine if you create some zinc that just has "discharge air temp sensor axAnnotated" in it -- the ordering doesn't matter.

I'm glad that you are trying to automate the tagging process with a program, thats a really good idea and I hope more people adopt that approach.

If you'd like an actual java library that deals with haystack values, and zinc encoding, etc, use haystack-java.

Richard McElhinney Thu 10 Jul 2014

Mike,

it's probably worth mentioning for those people doing Niagara development, that the haystack-java library is incorporated with the nhaystack.jar module, so people don't have to download it separately and bring it into the Niagara environment through another Niagara module.

It's just there and ready to use! :)

Cheers, Richard

Mike Jarmy Thu 10 Jul 2014

Good point, thanks Richard.

Yes, all of the haystack-java library lives inside of nhaystack.jar, so the whole thing is always just available already if you are doing AX programming.

Christian Tremblay Thu 10 Jul 2014

I figured out that it was easier to work with HDictBuilder.toDict() feature to generate tags.

This was found inside haystack library inside nHaystack :-)

Login or Signup to reply.