2、默认情况下,装配中的参数是看不见的。要打开选项设置一下:工具,选项,基础结构,产品结构,自定义树,参数,激活之。
void AddProperties(CATIProduct* iInstanceProd, CATDocument * ipDoc){ CATInit_var spInitOnDoc = ipDocif (NULL_var == spInitOnDoc) { cout <<"Could not get init on doc.\n"return } CATIContainer * pCont = (CATIContainer*) spInitOnDoc->GetRootContainer("CATIContainer")CATICkeParmFactory_var spFact(pCont)if(NULL_var == spFact) { cout <<"Could not get parm factory.\n"return} CATUnicodeString key = "Key"CATICkeParm_var spParm = spFact->CreateString(key, "Hallo")CATIPrdProperties_var spProp(iInstanceProd)if(!!spProp) { CATIParmPublisher* pPublisher = NULLspProp->GetUserProperties(pPublisher, TRUE)pPublisher->Append(CATISpecObject_var(spParm))}} 请问我用上面的方法添加的属性怎么修改啊?我用了CATIParmPublisher下的removechild方法删除参数可是没用。。。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)