Macro_capability_detailed.htm - suggested corrections

This section is for Users that want to create and share Documentation about UCCNC.

Re: Macro_capability_detailed.htm - suggested corrections

Postby Vmax549 » Fri Oct 07, 2016 9:35 pm

hi RObert let me know when you get it figured out I have tried for about 6 months now to do that.

(;-) TP
Vmax549
 
Posts: 1275
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Fri Oct 07, 2016 9:42 pm

.... screenshot at present using "greenshot" and print screen button which allows for a window

Alternative may be for cncdrive to kindly provide the XML function documentation that is used to create the intellisense tool tips... hint ;)

Basically you add " /// " above your function and it will add the intellisense tool tip info... and can be exported to XML...
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 968
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macro_capability_detailed.htm - suggested corrections

Postby cncdrive » Fri Oct 07, 2016 10:46 pm

Unfortunatelly intellisense explanation/help which Rob mentioned can't work, because the plugininterface is an external dll,
so whatever help text we add there does not appear when the dll is imported. :(
What appears in the intellisense is only the function prototypes with the function return type, name and the parameters,
but that is done by Visual Studio because it sees the function definitions in the .dll file, so it gives at least that help info.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Thu Oct 20, 2016 1:25 pm

Below is an extract of all plugin functions

Can I suggest firstly that maybe cncDrive consider standard nomenclature for some of the parameter names.....

such as the following examples:
void Addbutton(bool isAS3, double x, double y, double w, double h, bool toggletype, bool blinktype, int picturenumber, int buttonnumber, int layernumber)
void AddUCCAM(bool isAS3, int fillcolor, int posX, int posY, int sizeX, int sizeY, int labelnumber, int layernumber)

would it be possible to go through the function descriptions within uccnc as a houskeeping task and just change some of the desicriptions to standard ones please?
(once done, never need to be done again, and as you're only editing the descriptions there should be no change of bugs to to the change)

Note: these are the plugin functions..... not all will work with macros and screensets, and some of the macro functions are also not plugin functions, such as:
AddStatusmessage
Getcurrenttool
Ismacrostopped
Question
TextQuestion
Loadpicture


Although I've not tested the theory..... if the function has "bool isAS3" as a parameter it should be able to be used within screensets.... such as : void Addbackground(bool isAS3, and Addcheckbox(bool isAS3


void Addbackground(bool isAS3, double x, double y, double w, double h, int picturenumber, int backgroundnumber, int layernumber)
void Addbutton(bool isAS3, double x, double y, double w, double h, bool toggletype, bool blinktype, int picturenumber, int buttonnumber, int layernumber)
void Addcheckbox(bool isAS3, string labeltext, string labelfont, int fontsize, int fontcolor, int posX, int posY, int boxnumber, int layernumber)
void Addcodeview(bool isAS3, string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int Width, int Height, int layernumber)
void Addcolorpick(bool isAS3, double x, double y, double w, double h, int LEDnumber, int layernumber)
void Addcombobox(bool isAS3, int posX, int posY, int Width, int fontsize, int fontcolor, int Numberofaxis, int labelnumber, int layernumber)
void Addcomboboxitem(bool isAS3, string val, int labelnumber)
void Addfield(bool isAS3, string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, double posX, double posY, int intextboxwidth, string type, double min, double max, int labelnumber, int parentnumber)
void Addfill(bool isAS3, int fillcolor, int posX, int posY, int sizeX, int sizeY, double transparency, int labelnumber, int layernumber)
void Additemtolist(bool isAS3, string val, int labelnumber)
void Addlabel(bool isAS3, string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int layernumber)
void Addled(bool isAS3, double x, double y, double w, double h, int picturenumber, int LEDnumber, int layernumber)
int AddLinearMoveRel(int Axis, double Step, int StepCount, double Speed, bool Dir)
void Addlist(bool isAS3, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int Width, int Height, int labelnumber, int layernumber)
void Addmdi(bool isAS3, string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int intextboxwidth, int labelnumber, int parentnumber)
void Addtab(bool isAS3, string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int labelwidth, int labelheight, int picturenumber, int labelnumber, int parentnumber)
void Addtoolpath(bool isAS3, int x, int y, int width, int height, int layer)
void AddUCCAM(bool isAS3, int fillcolor, int posX, int posY, int sizeX, int sizeY, int labelnumber, int layernumber)
int Buttonpress_event(int buttonnumber, bool onscreen) //Called when the user presses a button on the UCCNC GUI or if a Callbutton function is executed. //The int buttonnumber parameter is the ID of the caller button. // The bool onscreen parameter is true if the button was pressed on the GUI and is false if the Callbutton function was called.
void Callbutton(int buttonnumber)
void ChangeaxisDROvalue(int axisnumber, string val)
void Clearcomboboxitems(bool isAS3, int labelnumber)
void Clearlist(bool isAS3, int labelnumber)
void Clroutpin(int portnumber, int pinnumber)
void Code(string code)
void Codesync(string code)
int Configplugin(string pluginfilename)
int Configure_event() //Called from UCCNC when the user presses the Configuration button in the Plugin configuration menu. //Typically the plugin configuration window is shown to the user.
int Cyclethreadfinish_event()
int Cyclethreadstart_event()
void Disablejog(bool disable)
void Filterfieldtext(bool isAS3, string val, int labelnumber)
bool Get_event(string pluginfilename, Executer exec)
ushort[] GetAllModbusArray()
double GetABCXYZmachpos()
int Getanaloginput(int channel)
int Getanalogoutput(int channel)
double GetABCXYSpos()
bool Getbutton(int buttonumber)
bool Getbuttonstate(int buttonumber)
bool Getcheckboxstate(bool isAS3, int checkboxnumber)
long Getcodetotalruntimemsec()
int Getcolorpickercolor(bool isAS3, int labelnumber)
string Getcomboboxselection(bool isAS3, int labelnumber)
void GetDebugData(ref double D1, ref double D2, ref double D3, ref double D4, ref double D5, ref double D6, ref double D7, ref double D8, ref double D9, ref double D10)
string Getfield(bool isAS3, int fieldnumber)
double Getfielddouble(bool isAS3, int labelnumber)
int Getfieldint(bool isAS3, int labelnumber)
string Getgcodefilename()
bool GetLED(int LEDnumber)
int GetMaxLED()
int GetMaxVar()
bool GetModbusregister(int Registernumber, out ushort Value)
bool GetModbusregisters(int Startregister, int Registercount, out ushort[] Values)
string Getprofilename()
int Getselectedindexinlist(bool isAS3, int labelnumber)
double Getvar(int varnum)
void Init_event() //Called when the plugin is initialised. //The parameter is the Plugin interface object which contains all functions prototypes for calls and callbacks.
bool IsLoading()
bool IsMoving()
int JogOnSpeed(int Axis, bool Dir, double Speed)
void Loadfile(string filename)
int Loop_event() //Called in a loop with a 25Hz interval.
int MPGJogOff(int MPG)
void Pluginshowup(string Pluginfilename)
string Readkey(string section, string key, string defaultvalue)
void Resetswapaxis()
void selectlayer(bool isAS3, int layernumber)
void Sendallbuttonsup(bool isAS3)
void Setaxishomestate(int axis, bool Ishomed)
void Setcheckboxstate(bool isAS3, bool Ison, int Boxnumber)
void Setcolorpickercolor(bool isAS3, int theColor, int IDnumber)
void Setfield(bool isAS3, double val, int fieldnumber)
void Setfieldtext(bool isAS3, string val, int fieldnumber)
void SetLED(bool state, int LEDnumber)
bool SetModbusregister(int Registernumber, ushort Value)
bool SetModbusregisters(int Startregister, ushort[] Values)
void Setoutpin(int portnumber, int pinnumber)
int SetPictureData(Plugininterface.Entry.LaserPictureData _LaserPictureData, byte[][] BrightnessDataInput)
void Setvar(double value, int varnum)
int Showplugin(string pluginfilename)
int Showup_event() //Called when the Pluginshowup(string Pluginfilename); function is executed in the UCCNC.
int Shutdown_event() //Called when the UCCNC software is closing.
void Slaveaxis(int masteraxis, int slaveaxis)
void Startup_event() //Called from UCCNC when the plugin is loaded and started.
void Stop()
void StopWithDeccel()
void Swapaxis(int axis1, int axis2)
void Switchbutton(bool isAS3, bool Ison, int Buttonnumber)
void Updatecomboboxselection(bool isAS3, int selectedindex, int labelnumber)
void Validatefield(bool isAS3, int fieldnumber)
void Validatenewcomboboxitems(bool isAS3, int labelnumber)
void Wait(int milliseconds)
void Writekey(string section, string key, string value)
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 968
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Thu Oct 20, 2016 1:56 pm

The following is the list of official (i.e. documented screenset functions available)
Addbackground
Addbutton
Addcheckbox
Addfield
Addled
Addmdi
Addtab
Filterfieldtext
Loadpicture
selectlayer
Setfield
Setfieldtext

The following is a list of presumed screenset functions available to create and manipulate screenset information:
void Addcodeview(string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int Width, int Height, int layernumber)
void Addcolorpick(double x, double y, double w, double h, int LEDnumber, int layernumber)
void Addcombobox(int posX, int posY, int Width, int fontsize, int fontcolor, int Numberofaxis, int labelnumber, int layernumber)
void Addcomboboxitem(string val, int labelnumber)
void Addfill(int fillcolor, int posX, int posY, int sizeX, int sizeY, double transparency, int labelnumber, int layernumber)
void Additemtolist(string value, int labelnumber)
void Addlabel(string labeltext, string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int layernumber)
void Addlist(string labelfont, string textalign, int fontsize, int fontcolor, int posX, int posY, int Width, int Height, int labelnumber, int layernumber)
void Addtoolpath(int x, int y, int width, int height, int layer)
void AddUCCAM(int fillcolor, int posX, int posY, int sizeX, int sizeY, int labelnumber, int layernumber)
void Clearlist(int labelnumber)
bool Getcheckboxstate(int checkboxnumber)
int Getcolorpickercolor(int labelnumber)
string Getcomboboxselection(int labelnumber)
string Getfield(int fieldnumber)
double Getfielddouble(int labelnumber)
int Getfieldint(int labelnumber)
int Getselectedindexinlist(int labelnumber)
void Sendallbuttonsup()
void Setcheckboxstate(bool Ison, int Boxnumber)
void Setcolorpickercolor(int theColor, int IDnumber)
void Switchbutton(bool Ison, int Buttonnumber)
void Updatecomboboxselection(int selectedindex, int labelnumber)
void Validatefield(int fieldnumber)
void Validatenewcomboboxitems(int labelnumber)
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 968
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Sat Oct 22, 2016 9:47 am

Well I've been stuck with a dilemma regarding functions and the manual I created....

Some functions can be used with screensets, some with macros and some only with plugins, and there is a combination of all three possibilities in some cases....

I didn't want to bload the manual by listing functions in three sections if they could be used with the other two, hence I've come up with the following table arrangement with a cross indicating the functions compatibility....

comments on a postcard, what do you think? (The manual should be there to help you afterall, if it's not user friendly / could be better then it's best to set it out early what you think may be useful [or not]).
Attachments
2016-10-22 10_43_57-UCCNC MACROS [Compatibility Mode] - Microsoft Word.png
2016-10-22 10_44_34-UCCNC MACROS [Compatibility Mode] - Microsoft Word.png
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 968
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macro_capability_detailed.htm - suggested corrections

Postby ger21 » Sat Oct 22, 2016 11:06 am

I know it's more work, but I'd prefer 3 different manuals, or at least 3 different sections.
Very, very few users will ever write plugins, so why make them have to parse through a document where a large percentage of the items don't pertain to them?
Just my thoughts, you don't need to agree. :) (I'm very grateful for what you've done)

Personally, I'd like a "quick reference", with just a list as you've posted in those previous emails. I'm going to copy those two emails and print them out.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1140
Joined: Sat Sep 03, 2016 2:17 am

Re: Macro_capability_detailed.htm - suggested corrections

Postby beefy » Sat Oct 22, 2016 8:22 pm

If you end up doing the 3 different manuals you could just have 3 letters next to each command (S M P), example if the command can be used in a screenset and a macro but not in a plugin S M P
Any good ??

Or the P could be grayed out or striked through.

Keith
beefy
 
Posts: 195
Joined: Mon Sep 05, 2016 10:34 am

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Sat Oct 22, 2016 8:45 pm

Comments below noted, keep them coming (off outside, get a chance to cut a bit of plate this evening).

found another macro function in M200 macro (listed here so I can find it later for the manual, may be of use to someone in the interim)
Code: Select all
int originalmodalmode = exec.actualmodal; // remember the modal mode
..
exec.Code("G" + originalmodalmode); // Set system back to the original distance mode
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 968
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macro_capability_detailed.htm - suggested corrections

Postby Vmax549 » Sat Oct 22, 2016 9:31 pm

That one only tells you if it is in G0 or G1 mode.

(;-) TP
Vmax549
 
Posts: 1275
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

PreviousNext

Return to User Documentation

Who is online

Users browsing this forum: No registered users and 2 guests