zoukankan      html  css  js  c++  java
  • 修改注释内容

    #include <uf_defs.h>
    #include <uf_ui_types.h>
    #include <uf_drf.h>
    #include <uf_obj.h>
    #include <uf_part.h>
    #include <uf.h>
    #include <uf_modl.h>
    #include <uf_ui.h>
    #include <string.h>
    #include <uf_object_types.h>
    #include <uf_ui_types.h>

    设置过滤

    	selection0->GetProperties()->SetString("LabelString", "选择注释");//设置文字
    		selection0->GetProperties()->SetString("Bitmap", "note");//设置图标
    		selection0->GetProperties()->SetEnum("SelectMode", 1);//多选模式
    		//设置过滤只选注释
    		Selection::SelectionAction object = Selection::SelectionActionClearAndEnableSpecific;
    		std::vector<Selection::MaskTriple>masks(1);
    		masks[0] = Selection::MaskTriple(UF_drafting_entity_type, UF_draft_note_subtype, 0);
    		selection0->GetProperties()->SetSelectionFilter("SelectionFilter", object, masks);
    
    		UF_initialize();
    		//对象收集器控件
    		PropertyList*  FaceSelectProps = selection0->GetProperties();
    		std::vector<NXOpen::TaggedObject *> notes = FaceSelectProps->GetTaggedObjectVector("SelectedObjects");
    		delete FaceSelectProps;
    		FaceSelectProps = NULL;
    		
    		//获取字符串内容
    		NXString str = string0->GetProperties()->GetString("Value");
    		char ch[133];
    		strcpy_s(ch, 133, str.GetLocaleText());
    		char cp4[][133] = { 0 };
    		strcpy(cp4[0], ch);
    		if (strlen(ch) != NULL)
    		{
    			for (int i = 0; i < notes.size(); i++)
    			{
    				//更改注释
    				uc5566(notes[i]->Tag(), 1, 1, cp4);
    			}
    		}
    		else
    		{
    			uc1601("没有输入内容", 1);
    			
    		}
    		UF_terminate();
    

      

  • 相关阅读:
    网络爬虫(抓取)正则表达式 (多线程协作)
    Asp.net 主题
    Asp.net 菜单控件
    CSS 布局Float 【4】
    CSS 布局Float 【3】
    CSS 布局Float 【2】
    CSS 布局Float 【1】
    CSS 布局Float 【0】
    Asp.Net 母版页
    Sql Server 远程过程调用失败
  • 原文地址:https://www.cnblogs.com/liuxiaoqing1/p/12318004.html
Copyright © 2011-2022 走看看