hi happy new year,
here "UF_STRING_t * sectionEditData" is pointer to the string structure of a single string to add or replace.
but for some reason i am not getting output of"UF_MODL_replace_feat_strings" function"
can anyone help me?
Code:void defGeometry::ReplaceSpline(std::vector<struct geometricSection>sections) { int j=1; tag_t PartTag=NULL_TAG; tag_t feat_tag=NULL_TAG; char feat_name[]="THROUGH"; UF_STRING_t * sectionEditData=NULL; sectionEditData= (UF_STRING_t *) malloc (sizeof(UF_STRING_t)*ActionSide.NumberOfSections); PartTag=UF_PART_ask_display_part(); UF_CALL(UF_OBJ_cycle_by_name_and_type (PartTag, feat_name, UF_feature_type, FALSE, &feat_tag)); if(!feat_tag) { sysLogPrint("Failed to create spline !"); } else { sysLogPrint("s.t=%d",feat_tag); } for(int i=0;i<ActionSide.NumberOfSections;i++ ) { int k=0; UF_MODL_init_string_list(§ionEditData[i]); UF_MODL_create_string_list(1, 4, §ionEditData[i]); sectionEditData[i].string[0]=4; sectionEditData[i].dir[0]=UF_MODL_CURVE_START_FROM_BEGIN; for( map<int,tag_t>::iterator iter = sections[i].section_tags.begin();iter != sections[i].section_tags.end(); iter++) { sectionEditData[i].id[k]=(*iter).second; k++; if( j<=3) { if(!UF_CALL(UF_MODL_replace_feat_strings (feat_tag, UF_MODL_STRING_REPLACE, §ionEditData[i], 1, j++))) { sysLogPrint("spline replaced j<=3"); } else { sysLogPrint("spline not replacedj<=3"); } } else { UF_CALL(UF_MODL_replace_feat_strings (feat_tag, UF_MODL_STRING_ADD, §ionEditData[i], 1, (j++)-1)); } UF_MODL_update (); } }



LinkBack URL
About LinkBacks


