Deleting API Items

Worker APIs

The removal of Worker API items involves removing the VIs and typedefs that are created by the Worker API scripting tools. This will soon become a quick and easy task if you are familiar with developing applications in LabVIEW.

Good to know

The removal of API items will be scripted (automated) in the next version of the framework !

The images below are taken from the Workers Fundamentals example project.

To remove a Local Request

To remove a specific Local Request, you need to remove the project items in the Worker that were created by the Create MHL Case tool for the Local Request. You will also want to delete these items from where are they saved on disk. In addition, you will also need to clean-up any code where Local Request VIs were used.

Example: say you wanted to remove the Local Request called "Increment Counter" from Worker C.

Step 1 : Remove the Local Request's associated MHL case in your Worker called "Increment Counter" by right clicking over the MHL case's selector label and selecting "Delete This Case" from the right-click menu, as shown below.

Step 2 : In your LabVIEW project, remove from your Worker the associated Request VI and typedef for the Local Request called "Increment Counter". These are shown in the diagram below.

Step 3 : Remove all instances where the Local Request VI (and typedef) were used throughout your application.

Step 4 : Finally, delete the Local Request VI and typedef from where they are saved on disk.

Step 5 : Update your project and save it. The selected Local Request has now been removed.

To Remove a Public Request

To remove a specific Public Request, you need to remove the project items in the Worker that were created by the Public API Builder tool for the Public Request. You will also want to delete these items from where are they saved on disk. In addition, you will also need to clean-up any code where Public Request VIs were used.

Example: say you wanted to remove the Public Request called "Return Number" from Worker B.

Step 1 : Remove the Public Request's associated MHL case in your Worker called "Return Number" by right clicking over the MHL case's selector label and selecting "Delete This Case" from the right-click menu, as shown below.

Step 2 : In your LabVIEW project, remove from your Worker the associated Request VI and typedef for the Public Request called "Return Number". These are shown in the diagram below.

Step 3 : Remove all instances where the Public Request VI (and typedef) were used throughout your application.

Step 4 : Finally, delete the Public Request VI and typedef from where they are saved on disk.

Step 5 : Update your project and save it. The selected Public Request has now been removed.

To Remove a Public Request w/Reply

To remove a specific Public Request w/Reply, you need to remove the project items in the Worker that were created by the Public API Builder tool for the Public Request w/Reply. You will also want to delete these items from where are they saved on disk. In addition, you will also need to clean-up any code where Public Request w/Reply VIs were used.

Example: say you wanted to remove the Public Request w/Reply called "Get Counter Value" from Worker C.

Step 1 : Remove the Public Request w/Reply's associated MHL case in your Worker called "Get Counter Value" by right clicking over the MHL case's selector label and selecting "Delete This Case" from the right-click menu, as shown below.

Step 2 : In your LabVIEW project, remove from your Worker the associated Request w/Reply VI and typedefs for the Public Request w/Reply called "Get Counter Value". These are shown in the diagram below.

Step 3 : Remove all instances where the Public Request w/Reply VI (and typedefs) were used throughout your application.

Step 4 : Finally, delete the Public Request w/Reply VI and typedefs from where they are saved on disk.

Step 5 : Update your project and save it. The selected Public Request w/Reply has now been removed.

To Remove a Public Response

To remove a specific Public Response, you need to remove the project items in the Worker that were created by the Public API Builder tool for the Public Response. You will also want to delete these items from where are they saved on disk. In addition, you will also need to clean-up any code where Public Response VIs were used (or registered with a Caller).

Example: say you wanted to remove the Public Response called "Return Number" from Worker B.

Step 1 : In your LabVIEW project, remove from your Worker the associated Response VIs and typedef for the Public Response called "Return Number. These are shown in the diagram below.

Step 2 : Remove all instances where the Public Response VIs (and typedef) were used throughout your application.

Step 3 : Finally, delete the Public Response VIs and typedef from where they are saved on disk.

Step 4 : From the Worker's Response Cases.ctl, you need to remove the string control that has the same label name as the Public Response. In this example, we want to remove the string control called "Return Number" from the cluster, as shown below.

Important

If there is only one item in the Response Cases cluster, since you cannot have an empty cluster (this will cause the typedef to break) you will need to add an empty string field and give it a name like "placeholder".

Step 5 : Update the Response Case.ctl and save it.

Step 6 : Update your project and save it. The selected Public Response has now been removed.

Last updated