![]() |
【转帖】parsing colors in version 1.5
parsing colors in version 1.5
parsing colors in version 1.5 i just installed version 1.5 of directdwg. in this version the class odcmcolor does not exist any more. i used the member isbycolor to test if the color of an entity is definied by its layer; how can i get the same result with the new version? odcmcolor method is to be redesigned since entity in ac 2004 may have not only aci (color index) but rgb color too. in previous version rgb-related functionality was not implemented (isbycolor() method determines if color is set by rgb). probably you used isbylayer() method. until new odcmcolor is implemented supporting new ac2004 features you can simply check the value of color index: 0-byblock, 256-bylayer. sergey slezkin in case of 0 (by block) which is the way to read color data from the block? there is not any method to retreive color using oddbblockreference class oddbblockreference class is oddbentity inheritor. so it has colorindex() method. sergey slezkin |
所有的时间均为北京时间。 现在的时间是 05:29 AM. |