Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello,
I have a question regarding 2D notes with attachment to an axis. I am talking about drawing notes - not 3D annotations!
See attached screenshot.
I am able to create a note with a leader attachment to a point or an axis.
My problem: The attachment to the axis cannot be easily modified by the user after creation. When you create this type of note with Pro/E manually, you are able to move the leader along the axis by simply dragging the attachment point. The notes/leaders created with Toolkit can be modified only byusing the command"modify attach" on the note.
Does anyone of you has ever done this?
What I already tried:
With PRO_DTLATTACHTYPE_OFFSET my Attachpoint is the leader attach point in screen coords (z==0) and Selection contains the view, the item selection and the UV parameter==0.5 to attache the leader to the center of the axis:
ProDtlattachAlloc (PRO_DTLATTACHTYPE_OFFSET, NULL, AttachPoint, Selection, &hLeaderAttachment);
With PRO_DTLATTACHTYPE_PARAMETRIC my selection contains the view, the point coords AND the UV parameter:
ProDtlattachAlloc (PRO_DTLATTACHTYPE_PARAMETRIC, NULL, NULL, Selection, &hLeaderAttachment);
Thanks for any tips,
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Am Wartfeld 7
D-61169 Friedberg
phone: +49 151 21259910
mail: -
Hi all,
Andreas,
ProView drw_view;
ProSelection axis_sel;
axis_sel has to be from ProSelect while in a drawing.You could also build aselectionfrom the known axis' ProAsmcomppath and ProGeomitem. In this case you wouldneed to calculatemidpoint of anaxis in the owner model coordinates and use ProSelectionPoint3dSet as well as ProSelectionUVParamSet where UV should be {0.5 , 0}. You would also need a drawing view handle to use in ProSelectionViewSet.
This is what I would use for ProDtlattachAlloc arguments:
ProDtlattachAlloc( PRO_DTLATTACHTYPE_PARAMETRIC, NULL, NULL, axis_sel, &attach);
(This is working in Creo2)
HIH.
Feliks.
In Reply to Andreas Hellmann:
Hello,
I have a question regarding 2D notes with attachment to an axis. I am talking about drawing notes - not 3D annotations!
See attached screenshot.
I am able to create a note with a leader attachment to a point or an axis.
My problem: The attachment to the axis cannot be easily modified by the user after creation. When you create this type of note with Pro/E manually, you are able to move the leader along the axis by simply dragging the attachment point. The notes/leaders created with Toolkit can be modified only byusing the command"modify attach" on the note.
Does anyone of you has ever done this?
What I already tried:
With PRO_DTLATTACHTYPE_OFFSET my Attachpoint is the leader attach point in screen coords (z==0) and Selection contains the view, the item selection and the UV parameter==0.5 to attache the leader to the center of the axis:
ProDtlattachAlloc (PRO_DTLATTACHTYPE_OFFSET, NULL, AttachPoint, Selection, &hLeaderAttachment);
With PRO_DTLATTACHTYPE_PARAMETRIC my selection contains the view, the point coords AND the UV parameter:
ProDtlattachAlloc (PRO_DTLATTACHTYPE_PARAMETRIC, NULL, NULL, Selection, &hLeaderAttachment);
Thanks for any tips,
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Am Wartfeld 7
D-61169 Friedbergphone: +49 151 21259910
mail: -
Hi Feliks,
thanks for your answer. Today I was able to do some tests.
I am not able to create a leader to an axis AND THEN MOVE THE ATTACHMENT ALONG THE AXIS.
Using an edge or surface as reference for the leader attachment, then it works.
Here's my code (see attachment), just in case somebody has any ideas - I will open a case at PTC's customer support.
Andreas
__________________________________
Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Am Wartfeld 7
D-61169 Friedberg
phone: +49 151 21259910
mail: -