Skip to main content
1-Visitor
June 5, 2018
Question

Sketch Auto dimension with diameter dimension

  • June 5, 2018
  • 1 reply
  • 2422 views

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!

1 reply

FV_01
June 5, 2018

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...

1-Visitor
June 6, 2018

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_01
June 7, 2018
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.