Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Offset symbols in drawings


Offset symbols in drawings

We have a toolkit application which adds symbols to dimensions in
drawings. With Wildfire 4, the symbols can be added using an offset
attachment, so that if the dimension is moved the symbol will move with
it (this could not be done in toolkit in previous revisions.) The
problem that I am having is that the ProDtlattachAlloc command requires
a ProSelection object
ProDtlattachAlloc(PRO_DTLATTACHTYPE_OFFSET, NULL, location,
selection, &attach);

I do not want the user to have to select each dimension, so I am trying
to create the ProSelection object using
ProSelectionAlloc(NULL, dim, &selection); //note the NULL is an
optional ProAsmcomppath\

NOTE: If I pass a part or subassembly dimension into ProSelectionAlloc,
then use the created ProSelection object in ProDtlattachAlloc, it will
return an error.

This seems to work good for dimensions which are on the top level
assembly, however it fails for part and subassembly dimensions. I think
that the ProAsmcomppath is required to create the ProSelection on
subcomponents, but I can not figure out how to make the ProAsmcomppath.
Most of the occurrences in the sample code of ProAsmcomppath are as an
output of ProSelectionAsmcomppathGet(), which does not help me since I
would have to have a ProSelection already to use this. It looks like
the ProAsmcomppath could be created manually, however it requires some
kind of table entries that locate the solid in the assembly tree (and I
have no idea how to get that).

I have a call in to PTC on how to do this, but before I spend a few days
trying to make a simple example to send to them, does anyone know how to
create a ProAsmcomppath for a subassembly or part?


Scott Edsell
TYCO Electronics

This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.


To manually build a ProIdTable (assembly component path) you need to
traverse the components of the assembly. Each time you visit a
component you need to append it's feature id in the table thus creating
a bread crumb trail or "path" to the component. There is a good example
of this in the UtilVisit.c file in your Pro/TOOLKIT installation. In
that file, look up the functions ProUtilAsmTraverse and
ProUtilAsmTravAction. These functions build a ProIdTable manually. You
can then use this table in the function ProSelectionAlloc.

Patrick Williams | Sr. Application Engineer | Engineering Systems |
Steelcase Inc. | 616.698.4078 | My Site

Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.