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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Sketch Auto dimension with diameter dimension

Ketan_Lalcheta
19-Tanzanite

Sketch Auto dimension with diameter dimension

Hello I am creating sketch for revolve. Profile of sketch is very simple. Just a rectangle prepared by adding four lines. Refer attached snap for more details. It works fine if I dont create any dimension and simply use API ProSectionAutodim(). Issue occurs if I try to give diameter dimension using API ProSecdimCreate() and ProSecdimDiameterSet(). Diameter dimension makes 1.5 dimension in existing skecth as redundant dimension. I am also doing ProSectionAutodim() after creation of diameter dimension. this lead to undisturbed sketch as per attachment. Could anyone please help me on this? Feel free to ask if I have not made question very clear. Thanks in advance!

5 REPLIES 5
FV
17-Peridot
17-Peridot
(To:Ketan_Lalcheta)

disable autosolver and dimension every vertex even if it leads to overdimensioning. regenerate your section, get errors, delete dimensions, repeat the process until your section regenerates clean. you are having problems with unpredictability of the internal solver with weak dimensions/constraints and  pro/toolkit dimensions - two systems are not happy with each other...

Ketan_Lalcheta
19-Tanzanite
(To:FV)

Hi

 

Thanks for your response. But I could not get your point. Below is what I have understood:

 

  • disable autosolver : I should not use ProSectionAutodim(). Got it.
  • dimension every vertex : Should I dimension all four entity length using section dim create API addition to diameter dimension?
  • get errors, delete dimensions : How to delete dimension using error?

Additionally, We cannot create dimension having value 15 (in previously attached snap) through toolkit... Right?

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

ProSectionIntentManagerModeSet( section, PRO_B_FALSE);

then, for every vertex

ProSecdimCreate( section,entdim_ids,pnt_types,2,  PRO_TK_DIM_PNT_PNT_HORIZ,dim_placement_pnt_horiz,&dim_ids[0]);
ProSecdimCreate( section,entdim_ids,pnt_types,2,  PRO_TK_DIM_PNT_PNT_VERT,dim_placement_pnt_vert,&dim_ids[1]);

where pnt_types would be PRO_ENT_WHOLE for the first (datum reference) entity and PRO_ENT_START or PRO_ENT_END for a line vertex.

then

ProSecerrorAlloc(&sec_errors);
ProSectionSolve(section, &sec_errors);
ProSectionRegenerate(section, &sec_errors);

consult the manual how to interpret errors, there are some examples...

 

As a side note - you would make your life easier if you could avoid programmatically creating entities and dimension in section mode. You would have less troubles maintaining your app between pro/e releases if you would use either UDF or section palette for the initial section and programmatically modify the known in advance dimension scheme - take a look how ptc's Pro/Mold features are utilizing sections($PTC_INSTALL\$PTC_DATECODE\Common Files\apps_data\mold_data\sections)

HIH.

FV.

Ketan_Lalcheta
19-Tanzanite
(To:FV)

Thank you very much for your detailed explanation.

I will surely give a try to it tomorrow as I am in different time zone. Meanwhile, could you please let me know whether I have to create point also for dimension creation as PNT_PNT. Till now, I have only created lines in section.

 

Thanks again for details.

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

in that case use PRO_TK_DIM_LINE_POINT, whatever works... I am usually making a sketch coordinate system at 0,0 and using it as the first reference and this scheme allows to use PNT_PNT_VERT or PNT_PNT_HORIZ to control dimension orientation.
Announcements


Top Tags