如何建一个图,并改变颜色?
MxDraw网页开发|黄洪辉|2018-05-08 15:47
-
回答:
var layerId = mxOcx.AddLayer("断面图"); var database = mxOcx.GetDatabase(); var layer = database.ObjectIdToObject(layerId); //layer.Color.SetRGB(255,0,0); var newColor = layer.Color; newColor.SetRGB(255,0,0); layer.Color = newColor; mxOcx.LayerName = "断面图"; mxOcx.DrawCADColorIndex = 256; mxOcx.DrawText(0,0,"文字内容字符串",8.0,0.0,1,3);