Click or drag to resize

4.3 Sample Plug-ins

This Visual Studio solution creates two plug-in DLLs (SamplePlugins.dll and RAYLASE.Marker.RemoteInterfacePlugin.dll) and a little command line application for testing one of the plug-ins. As described in section 3.4 Writing Plug-ins for Use in RAYGUIDE the DLLs has to be copied into folder C:\Program Files\RAYLASE\RAYGUIDE\bin\Plugins\ to get loaded by RAYGUIDE, and the icon Shifter.svg into folder C:\ProgramData\RAYLASE\RAYGUIDE\Resources\Icons\ to show up in the list of job elements.

MarkableCircle

This is a job element similar to the regular circle available already in RAYGUIDE. But there is no special user interface to set the radius in this example. The plug-in is derived from class BaseMarkableVectorGraphic. A special icon file is not necessary here because an icon named MarkableCircle.svg is already available for the regular circle job element.

You will find the source code here.

Shifter

This is a job element derived from class BaseLoopFlow and can contain, like a group, several child objects. All child objects can be shifted, i. e. they get an offset from their original position. In the settings dialog the offset can be typed in into field Translates as a string containing the offset in x, y and z direction, separated by semicolons; e. g. "20;10;0" would translate all childs by 20 mm in x direction, 10 mm in y direction and not in z direction.

See the source code here.

Remote Client

This is not a plug-in but a little application for testing the Remote Interface. If started without command line parameters it tries to connect with port 350 and the last found DHCP supplied IP address defined on the host computer. If needed IP address and port number can be given as command line parameters; e. g.:
RemoteClient.exe 192.168.10.20 360
will try to connect with IP address 192.168.10.20 on port 360.

If the connection fails at program start it can be established later. A typical sequence of commands could be then:
address 192.168.10.21 370 (defines the address and port data for all following connections)
connect (connects with the server using the data given with the "address command)
open,C:\Users\fse\Documents\someJob.rg,eol (loads the given job)
run,eol (executes the active job)
disconnect (disconnects from the server)

See the source code here.