iCAx开思工具箱

标题: 如何改变一个对象的颜色啊? [打印本页]

作者: apple_bao_bao    时间: 2004-3-30 19:27
标题: 如何改变一个对象的颜色啊?
CATIA中如何使用代码改变一个对象的颜色啊?跪地请教高手了!!!
作者: jerryjun    时间: 2004-3-30 21:54
先使用選物件的指令
再用VisPropertySet  
如下
Set VisPropSet1 = selection1.VisProperties
  VisPropSet1.SetRealColor 255, int(255*(i-1)/max), int(255*(1-((i-1)/max)) )
作者: acoka    时间: 2004-3-30 23:39
....(CATISpecObject_var ispFeature )
  {
...
       CATIVisProperties *piGraphPropOnSpec = NULL;
      HRESULT  rc = ispFeature ->QueryInterface( IID_CATIVisProperties,  
                                                        (void**)[$ piGraphPropOnSpec )]
       if ( SUCCEEDED(rc) )  
       {
           CATVisPropertiesValues Attribut;
           Attribut.SetColor(255, 255, 0); // yellow
           Attribut.SetWidth(4);           // medium thickness
           piGraphPropOnSpec ->SetPropertiesAtt(Attribut, CATVPAllPropertyType, ****);
  
           piGraphPropOnSpec ->Release();
           piGraphPropOnSpec = NULL ;
       }
    }
...
}
作者: apple_bao_bao    时间: 2004-3-31 08:19
谢谢各位高手的指点了~~~真的谢谢了!~
作者: asange    时间: 2004-4-2 08:37
jerryjun wrote:
先使用選物件的指令  
  再用VisPropertySet   
  如下  
  Set VisPropSet1 = selection1.VisProperties  
   VisPropSet1.SetRealColor 255, int(255*(i-1)/max), int(255*(1-((i-1)/max)) )

  
请问 怎么实现交互式的选取对象?在VB中应该使用哪个指令?比如在DRAFTING中我要选中一个尺寸标注。谢谢




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3