|  | 
 
 
 楼主|
发表于 2009-6-1 21:14:34
|
显示全部楼层 
回复: PR261534 DimInfos do not update as expected if dimension changes
| int CPCDtp_start_location::executeprivate(int /*step_number*/, int /*mode*/) {
 global_dimension = this;
 
 if(global_execute_mode && global_dmis_created_partprogram && featureid) // 225853 only applies to part programs translated from DMIS
 {
 if(!internal_dmis_feat_label.IsEmpty())
 DMISSearchExecList(m_pPartProgram, internal_dmis_feat_label, &featureid);
 else if(featureid)
 DMISSearchExecList(m_pPartProgram, featureid->get_id(), &featureid);
 }
 
 // PR248672 - force a re-calculation of the XYZDRA etc. if required
 if( m_bRecalculate )
 {
 CPCDcommand * ptr = this->next;
 while (ptr && ptr->is_dim_tp_location_axis())
 {  // force a re-calculation of the XYZDRA etc. // PR258933 - never include nominals
 ptr->sequence = 0;
 ptr = ptr->next;
 }
 
 m_bRecalculate = FALSE;
 }
 
 // setup the datum ference object
 do_math();
 
 /*
 // If AXISBOTHENDS, add a new tp_start_location for STARTPT & ENDPT.
 // This should only happen once, when the text is created, because
 // this changes the use_axis to be AXISSTARTPT.
 if(use_axis == AXISBOTHENDS && featureid &&
 featureid->feature() == F_CYLINDER) {
 use_axis = AXISSTARTPT;
 CPCDcommand *p1,*end;
 end = this;
 while (end) {
 if(end->type() == DIMENSION_TRUE_END_POSITION) break;
 end = end->next;
 }
 p1 = (CPCDcommand *)new CPCDtp_start_location(0L,featureid,NULL,AXISENDPT,use_axis_ref_length);
 p1->next=(CPCDcommand *) new CPCDtp_end_location();
 if(p1->next) p1->next->prev=p1;
 p1->InsertAfter(end,TRUE);
 }
 */
 
 graphical_analysis();
 PrepareReportResults(); // Task#100972 - dturcotte
 
 // no need to draw_element here if !global_execute_mode or dimension wasn't updated in read_dialog
 if (global_execute_mode || get_dialog_read())
 {
 draw_element(TRUE);
 }
 set_dialog_read(FALSE);
 sequence = ++global_sequence; // PR261534 - so diminfo will know that it is out-of-date
 return 0;
 }
 | 
 |