API download

API download

Postby pinkgoat » 04 Dec 2016, 12:46

Where can I find the latest API ?
pinkgoat
 
Posts: 32
Joined: 05 Jun 2015, 19:44
Controller: Mk3

Re: API download

Postby Support » 06 Dec 2016, 14:06

Yes, API is available:

viewtopic.php?f=16&t=824 (see bottom files)

Please follow these steps for quick start with PlanetCNC API (for using example):

1. Download API files from this link:
download/file.php?id=696 (C#)

2. Extract files to dedicated project folder

3. Start Visual Studio: File/Open → Project/Solution → CNCUSBControllerAPI_CSharp.csproj
Software may ask you for upgrade (it depends on which software version are you using).

4. In your project folder software will create “Backup” folder and backup file. Delete them.

5. Click Build/Rebuild solution. Error is expected.

6. Copy/paste files from install folder of CNC USB controller software(PlanetCNC software should be instlled) into BIN/Debug folder of your project folder: .lic, .dll, .var, .keys, .settings

7. Click View/Solution Explorer and click “References“(see image)
You will notice there is an exclamation point next to CNCUSBController API reference. Right click to this reference and click Remove.

8. Right click on the main “Reference” → Add reference → browse and add CNCUSBController API.dll file from your project/BIN/Debug folder.

Click Rebuild and if you get error do this:
Change lines "cnc.SendOutput(o);" into "cnc.SendOutput((int)o, PlanetCNC.API.OutputEnum.On);"

You should be able to start .exe file of API example located in BIN/Debug folder

Unfortunately we do not have API documentation ready, but we have it planned for future.
Support
 
Posts: 2577
Joined: 07 Apr 2014, 17:39
Controller: Many controllers


Return to API



Who is online

Users browsing this forum: No registered users and 2 guests