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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

a 3d Proselection to 2d Proselection

634063460
1-Visitor

a 3d Proselection to 2d Proselection

Iwant to select two axis in 3d,then auto transform both to dtl_axis in
drawing with ProDrawingAxisToDtlaxis .but the return value is always PRO_TK_GENERAL_ERROR.


isthat possible,and besides axis, what about edge, surface,feature and so on



7 REPLIES 7
FV
17-Peridot
17-Peridot
(To:634063460)

Hi all,


Xiaojing,


It is quite difficult to figure out what you were doing without looking at the code.


In general you need to know drawing view and drawing sheet in which you are planning to create a detail axis.


With that information youneed tocalculate transformation from model coordinates to drawing coordinates and drawing view coordinates. Then you need to map your selection coordinates to drawing using those transformations and set up Point3d for your selection. You also need to set up UV parameter for your selection.


HIH.


( I did not understand what you were asking about edge, surface, feature)


Feliks.

In Reply to xiaojing kan:



Iwant to select two axis in 3d,then auto transform both to dtl_axis in
drawing with ProDrawingAxisToDtlaxis .but the return value is always PRO_TK_GENERAL_ERROR.


isthat possible,and besides axis, what about edge, surface,feature and so on




Feliks,


Thanks for your reply. The application I want to achieve, is that obtain modelitems in 3d, then annotation them in 2d automaticly. For example, I found two axis which I needed , then annotation would be created in 2d.


code as follow:


status = ProAxisToGeomitem(p_PrtSolid, parr_Axis[0], &p_AxisGeom[0]);//轴转化为ID;
status = ProAxisToGeomitem(p_PrtSolid, parr_Axis[1], &p_AxisGeom[1]);
ERROR_CHECK("ProAxisToGeomitem", status);


status = ProSelectionAlloc(NULL, (ProModelitem*)&(p_AxisGeom[0]), &p_select[0]);
status = ProSelectionAlloc(NULL, (ProModelitem*)&(p_AxisGeom[1]), &p_select[1]);
ERROR_CHECK("ProSelectionAlloc", status);

FV
17-Peridot
17-Peridot
(To:634063460)

Hi all,


Xiaojing,


The code you had posted could not work. You are not giving enough info to Pro/E to construct detail axis. How Pro/E issupposed to know in which drawing view you were expectingentities to be created. Pro/E needs info about ProPoint3d of the Select3d structure as well as UV parameter. Also, you are passing NULL as ProAsmcomppath argumentand most of the time this is alsonot a good idea. Another thing to take a look at is stack/heap allocation of your arrays ( p_AxisGeom, p_select)...


HIH.

In Reply to xiaojing kan:



Feliks,


Thanks for your reply. The application I want to achieve, is that obtain modelitems in 3d, then annotation them in 2d automaticly. For example, I found two axis which I needed , then annotation would be created in 2d.


code as follow:


status = ProAxisToGeomitem(p_PrtSolid, parr_Axis[0], &p_AxisGeom[0]);//轴转化为ID;
status = ProAxisToGeomitem(p_PrtSolid, parr_Axis[1], &p_AxisGeom[1]);
ERROR_CHECK("ProAxisToGeomitem", status);


status = ProSelectionAlloc(NULL, (ProModelitem*)&(p_AxisGeom[0]), &p_select[0]);
status = ProSelectionAlloc(NULL, (ProModelitem*)&(p_AxisGeom[1]), &p_select[1]);
ERROR_CHECK("ProSelectionAlloc", status);


FV
17-Peridot
17-Peridot
(To:634063460)

Hi all,


Follow up...


Just looked at my notes - the function ProDrawingAxisToDtlaxisstopped working at WF5 M030 and did not work since.


FV.

Cannot confirm this.

I use ProDrawingAxisToDtlaxis () in a Wildfire 5 (M170) and Creo2 (M030 and
M070) project and it works.



Andreas


Hi, Can you give me your code?


Thanks you very much.

FV
17-Peridot
17-Peridot
(To:634063460)

Hi all


Andreas you are correct, axises from datum axis features are working.


Axises from hole or revolve or extrude typefeatures are not working.


Feliks.

In Reply to Andreas Hellmann:


Cannot confirm this.

I use ProDrawingAxisToDtlaxis () in a Wildfire 5 (M170) and Creo2 (M030 and
M070) project and it works.



Andreas


Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags