Application Development Platform (ADP) DEMO


Introduction

ADP provides a persistence reference mechanism to the third party application developers. Using this mechanism, any third party application can have persistent reference to the Pro/DESKTOP objects. Later, client can refer to Pro/Desktop object given a persistent reference. Using this reference, third party applications can also query the objects about the current status.

In order to demonstrate the capability of the persistence reference mechanism provided by Pro/DESKTOP a sample application is provoided here. This sample is a COM client(VC++ 6.0).  Users can select line and/or curves in Pro/DESKTOP, and ask for the persistence references (display names) of these objects. The users can save these references in a file. Later, when user opens this file, the referenced design is automatically opened in Pro/DESKTOP. Using AdpFeatures of the demo, users can know the latest total length of the line/curves, whether any of the referenced line/curve got changed since they took reference last time. They can update persistence references as well.

The persistence reference is a very useful tool to applications developed on top of Pro/DESKTOP.  For example, a CAM application can query whether the geometry got changed and then can take measure to update the cutter path.  In the sample provided here, the total length of line/curves can be used  as design criterion. ( "Seam Welding Cost Calculation", "Tonnage calculation of sheet metal press", etc.)

How to Run Run "API\Utilities\AdpClient\release\AdpClient.exe". How to Build Open "API\Utilities\AdpClient\AdpClient.dsw".

Change the location of "ProD.tlb" and "ProD-Reference.tlb" in " AdpClient \StdAfx.h". ProD.tlb is available in the program folder, where user has installed Pro/DESKTOP. ProD-Reference.tlb can be picked from "program\com" folder.

Make the build.

Terminology Display Name : the persistence reference string given by Pro/ DESKTOP for a referenced object. How to Use Demo File Menu
View Menu
AdpFeature Menu
File Menu New Use this command to create a new document in "ADP Demo". Runs Pro/DESKTOP.
 
Open Use this command to open an existing document in a new window. Opens last referenced file in Pro/DESKTOP. Selects all referenced objects.
 
Save Use this command to save the active document to its current name and directory. When you save a document for the first time,  "ADP Demo" displays the Save As dialog box so you can name your document. Display Names are updated before saving.
 
Save As Use this command to save and name the active document. ? ADP Demo > displays the Save As dialog box so you can name your document.
 
Exit Use this command to end your "ADP Demo" session. This also closes Pro/DESKTOP.
View Menu Toolbar Use this command to display and hide the Toolbar, which includes buttons for some of the most common commands in "ADP Demo", such as File Open. Status Bar Use this command to display and hide the Status Bar. AdpFeatures Menu Select Line/Curves and Get Display Name Use this command to get the display name for the selected object in Pro/DESKTOP. Use "Resume Macro" after selection. Now the ADP client will have display names for these selected objects.

Note : If active design is a New Design, user has to save the design before using "Resume macro" command.
 

Calculate Total Length Use this command to get the total length of the referenced lines/curves.

This takes care of the in session or out of session modification of the lines in Pro/DESKTOP. Meaning, in two successive calls of this command if any of the referenced objects is modified, calculated length will get modified accordingly.
 

Select Objects Use this command to select all the referenced objects in Pro/DESKTOP.

This command binds all the display names to their corresponding objects and selects such objects in Pro/ DESKTOP.
 

Select Changed Objects Use this command to select all those referenced objects, which got changed since you :
This command binds all the display names to their corresponding Pro/ DESKTOP objects, checks whether object has been modified or not. Selects only the modified objects in Pro/ DESKTOP.

Note : make sure that no object was highlighted in Pro/ DESKTOP, before using this command.
 

Update Display Names Use this command to updates all display names to their current values.

This command binds all the display names to their corresponding Pro/Desktop objects, checks whether object has been modified or not. If an object is modified, it updates the corresponding display name.