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!
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...
Thanks for your response. But I could not get your point. Below is what I have understood:
Additionally, We cannot create dimension having value 15 (in previously attached snap) through toolkit... Right?
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); ProSecdimCreate( section,entdim_ids,pnt_types,2, PRO_TK_DIM_PNT_PNT_VERT,dim_placement_pnt_vert,&dim_ids);
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.
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)
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.