1. Set the color for the entity
In some analysis, such as electrical circuit analysis, the need to change the color of the entity according to the different state, then how to change the device color of the specified entity? The following provides code to resolve the problem.
SHAPE.GET_CELLSU ("LineColor"). ResultIU = (double) visdefaultcolors.visdarkgreen;//with electricity (green)
Where Visdefaultcolors is an enumeration, there are many colors, you can check the SDK, you can use its corresponding value to replace
dark Cyan
Constant |
Value |
Description |
visblack |
black |
visblue |
4 |
blue |
Viscyan |
7 |
cyan |
Visdark Blue |
dark Blue |
Visdarkcyan |
13 |
Visdarkgray |
19 |
dark d> |
Visdarkgreen |
9 |
VISD arkred |
dark Red |
visdarkyellow |
11 |
dark Yellow |
............
The above code is more concise, of course, you can use the following method:
SHAPE.GET_CELLSSRC (short) Vissectionindices.vissectionobject, (short) visrowindices.visrowline, (short) Viscellindices.vislinecolor). FormulaU = 4