UG二次开发中问取某个图档的修改历史信息

图档的修改历史信息包括:修改使用的NX版本,修改时间,修改用户名……

 {
		 tag_t tgPartTag=NULL_TAG;
		 int i=0 ,num_hists=0;
		 UF_PART_history_list_p_t history_list=NULL;

		 tgPartTag=UF_PART_ask_part_tag("C:\\Users\\Administrator\\Desktop\\3\\901-001.prt");

		 UF_PART_create_history_list( &history_list );
		 /* Clear the history list of the previous part. */
		 UF_PART_clear_history_list( history_list );
		 /* Get the history of the current part. */
		 UF_PART_ask_part_history( tgPartTag, history_list );
		 /* Get the total number of save histories of the part. */
		 UF_PART_ask_num_histories( history_list, &num_hists );
		 /* Get information about each particular save history and print a report.*/				 
		 for ( i=0 ; i < num_hists ; i++ )
		 {
			char    *program=NULL, *user=NULL, *machine=NULL;
			int     vers_num=0, vers_time=0;

			UF_PART_ask_nth_history( history_list, i,
				&program, &user, &machine,
				&vers_num, &vers_time );
			//print information of NX version
			uc1601(program,1);
		 }
		 return 0;
}


 

 

你可能感兴趣的:(NX版本)