Connecting objects in DFT and PAR/PSM?

[ Edited ]


Hello Wizards

In a certain .dft, I do GetReferenceKey() on each found DVLine2d object. In the corresponding .par I do the same on each Edge object.

I try to match them to find the .par Edge for a given .dft DVLine2d and OOPS! At first glance, no such correspondence exist. (Yes I know that I can use BindKeyToObject() but that gives me the Edge object for the dft key but not the par key and that is not good enough.. ) I find that all keys for DVLine2d carry a certain and same value in key byte 8. I find a corresponding value in all Edge keys. And of course, the value differ, so the keys differ. If I disregard that particular byte position 8, I can match DVLine2d's to Edge's pairwise and apparently unique.

Now, this is a kind of hackish way to get to my goal and I frankly hate it! So, is there another way?

Is the Reference Key's structured data with some official doc?

The application problem is to generate dft's from asm's/par's/psm's and retrieve data from Attached Property Tables (APTs) to expose in the asm. To do this in this app, I need to go from a DVLine2d to its Edge and then among the APTs see if the Edge is involved and if it is, use the APT Record data to do things. The missing link in this chain seems to be found in the ebove kludgy manner.




Posted by: Maria Reinhammar
Post date: 2/12/2008 2:30:49 AM


RE: Connecting objects in DFT and PAR/PSM?

[ Edited ]


I found the answer myself..

' For some DVLine2d, get its reference key and model file

dft.Sheets(1).DrawingViews(1).DVLines2d(DVLine2dIx).GetReferenceKey(parFilePath, dftKey, dftKeyLen)

' In that model file, get a pointer to the object

par.BindKeyToObject(dftKey, parObjRef )

' from that object, get the reference key

parObjRef.GetReferenceKey(parKey, parKeyLen)

Now we can search in e.g. AttachedPropertyTables if we have some object that correspond to the dft-line and do something useful..

My earlier complaints was not well founded


Posted by: Maria Reinhammar
Post date: 3/12/2008 5:03:46 AM