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.)
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.
Note : If active design is a New Design, user has to save the
design before using "Resume macro" command.
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.
This command binds all the display names to their corresponding objects
and selects such objects in Pro/ DESKTOP.
Note : make sure that no object was highlighted
in Pro/ DESKTOP, before using this command.
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.