I have worked with Dexterity for a while, but I'm just now trying to work with external .NET assemblies and I'm running into an error which is probably basic lack of understanding.
I am trying to build Zebra label printing directly into my Dexterity dictionary using the Zebra SdkApi.Core.dll assembly (latest version). I have added the .Net Assembly to the dictionary in the libraries section and it looks like I am able to reference the namespace, objects and some procedures. I am running into an issue with a specific procedure, and dexterity only says Unknown Method: "Write". I'm adding the very basic test procedure below, and I'm not sure if there's a special way I need to reference Objects which inherit other objects.
using Zebra.Sdk.Comm;
using System;
using System.Text;
local Connection printerConn;
local text PrintLabel;
printerConn = new TcpConnection("PrinterAddress", TcpConnection.DEFAULT_ZPL_TCP_PORT);{address, port}
PrintLabel="^XA^FO20,20^A0N,25,25^FDThis is a ZPL test.^FS^XZ";
printerConn.Open();
printerConn.Write(Encoding.UTF8.GetBytes(PrintLabel));
printerConn.Close();
Dex only flags the Write line with "Unknown method: 'Write' ". I have tried reading and writing to other properties and can access other basic methods.
Write has 3 overloads, but this is the most basic. All of them fail though.
Connection (interface) and TcpConnection (class) are members of Zebra.Sdk.Comm.
This is based on the example C# app here https://techdocs.zebra.com/link-os/2-15/pc_net/
I'll keep plugging away, but hopefully someone can point me in the right direction.
Thanks!