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 ger21 » Fri Oct 07, 2016 2:12 pm

With UCCNC at this point I would rather have them working on new FUNCTIONS in UCCNC rather than building/updating a master Manual with all the bells a whistles.


The problem is that only half of the functions are even listed anywhere.
I don't really care if there's a manual or not, but we should at least get a list of all of the functions.

Just because there were no docs for Mach3, doesn't mean it should be the norm. Help the users out at least a little, as they're the ones who will make the software more popular.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Fri Oct 07, 2016 3:21 pm

ger21 wrote:The problem is that only half of the functions are even listed anywhere.


I don't think that's quite correct.... there are a few missing / not listed ... at least they are being "discovered" or listed now.

I guess its relative to perspective, but stuff always falls through the gaps.... just catching it before the gaps get too big

The screenset stuff that I "found" I don't think is really necessary these days because of the graphical screen editor.... but I may be wrong

I have noticed that addmdi() function is not used with the current screensets.... not sure why though?
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Macro_capability_detailed.htm - suggested corrections

Postby ger21 » Fri Oct 07, 2016 3:40 pm

I don't think that's quite correct.... there are a few missing / not listed ... at least they are being "discovered" or listed now.


I meant in the official docs. In those, there's a lot of stuff missing.

The screenset stuff that I "found" I don't think is really necessary these days because of the graphical screen editor.... but I may be wrong


Those you can find by looking at the screenset file. The only one I needed was the Add Codeview, because you can't add one in the screen editor. Probably an oversight....
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Macro_capability_detailed.htm - suggested corrections

Postby ger21 » Fri Oct 07, 2016 5:45 pm

I'll try messing with visual studio this weekend to see.

I think I'll throw together a basic list with the functions only, on a short, simple document.

The screen designer is fine for me as is. It could be refined a little, but it's probably already better than Screen 4. Fixing the Tab order of selected item properties would make it a LOT better, with just a few minutes of work.

I also would prefer the developers to add functionality. As long as we can get the info we need. I don't really care how basic it is.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Macro_capability_detailed.htm - suggested corrections

Postby Robertspark » Fri Oct 07, 2016 6:31 pm

Off topic question

Anyone know of a way to extract visual studio intellisense tooltips?
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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...
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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: 4695
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)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

PreviousNext

Return to User Documentation

Who is online

Users browsing this forum: No registered users and 1 guest