The PTC Community is on temporary read only status in preparation for moving our community to a new platform. Learn more here
I am using Creo Pro/TOOLKIT (C++) to extract drawing dimension attachments.
Observed behavior:
ProDimensionAttachmentsGetProDrawingDimAttachpointsGetProDrawingDimAttachpointsViewGetThis occurs for both linear and ordinate dimensions, even though the drawing visually shows the dimension referencing the cylinder axis.
Questions:
Any guidance or confirmation would be appreciated.
ProDimensionAttachmentsGet require a license key for „TOOLKIT for 3D Drawings“, you have that lic key?
Thanks for Replying @RPN , We have a license key for ProDimensionAttachmentGet
and to add on: if a dimension is having two attachment (one as an edge) and the other one is the cylinder or hole axis,
The ProDimensionAttachmentGet API is retrieving the edge but failing to get the hole axis.
Sorry, as far I know you can’t have a license for a single call, for ProDimensionAttachmentGet a Toolkit license is not enough! On compilation you will not see an error, -4 = NOT_FOUND may tell you that the key is not found. It may return valid data until you not call 3D Drawing related data.
I am having the license named "TOOLKIT-for-3D_Drawings"
Is that enough or do i need more?
No that is good, if this (both) is active during you run (debug your code) Creo.
NOT_FOUND - Hmm,
are you sure you have setup the dimension correct, It must be a PRO_DIMENSION or a PRO_REF_DIMENSION point to the Solid with a correct ID. Check the item with ProModelitemInit, and the correct type, you need to get PRO_TK_NO_ERROR.
Or is the returned attachments_arr empty? What is the Array size?
What are the returned status values?
The attachments structure is an array of two ProSelection entities, from this you need to get the modelitem. You follow this?
Yeah i have checked with the other side attachment type correctly and properly getting ProModelItem handle under the
ProSelectionModelitemGet API.
So your returned size is 2, but if you have a dimension from one centerline to another you don't get the axis geom iD?
What is the modelitem content, type, ID?
From the manual: Note
The attachments structure is an array of two ProSelection entities. It
is provided to support options such as intersect where two entities must be
passed as input. From Creo Parametric 3.0 onward, you can create
dimensions that have intersection type of reference. The intersection type
of reference is a reference that is derived from the intersection of two
entities.
The function ProDimensionAttachmentsGet() and
ProDimensionAttachmentSet() provide access to the geometric
references and parameters of the driven or reference dimension. These functions
support dimensions that are created with intersection type of reference.
The last sentence I don't understand, and maybe the already known information makes this call absolut, for example if you have a diameter.
Are you dealing with drawings created in the same version, or something which is very old?
There is also ProDrawingDimAttachsGet()/ProDrawingDimAttachpointsGet() maybe you get here what you are searching for?
Purpose: Retrieves the attachments and the sense of the specified
drawing dimension. Only applicable for dimensions created
in drawing mode.
This function also supports drawing dimensions created
from intersections of geometric entities.
We have tried all the three available APIs but not getting needed output
So, you don’t get the geom axis? So what are you expecting?
can you share some „C“ code, maybe one function from your program, I know it’s frustrating if you search the needle. You can also write here a mail.
Else I’m out, because it is to complicated with that amount of information.
