Article | 70001034 |
Type | Wish |
Product | Engine |
Version | 7010 |
Date Added | 3/21/2017 12:00:00 AM |
Fixed | 7.7011.0.1 (3/22/2017 12:00:00 AM) |
Submitted by | efstathios tsoumas |
Summary
I would like to be able to set the color of the letters of the UCS Icon , currently are showing with ForeColor.
Solution
In version 7011 we exported another DrawCCSAxis override providing the ability to set the color of the X,Y,Z strings of the UCS Icon like below
summary> This function is used in the Document's OnDrawOverAll event to draw the Axis.
param name="render">The ActiveActionRender of the Document.
param name="DrawXAxis">A boolean value representing if the x axis will be drawn.
param name="DrawYaxis">A boolean value representing if the y axis will be drawn.
param name="DrawZaxis">A boolean value representing if the z axis will be drawn.
param name="DrawStrings">A boolean value representing if the strings will be drawn.
param name="StringsColor">The color of the X,Y,Z strings
param name="XAxisColor">A System.Color indicating the color of the x axis.
param name="YAxisColor">A System.Color indicating the color of the y axis.
param name="ZAxisColor">A System.Color indicating the color of the z axis.
param name="showUserCS">A boolean value representing if the axis will be drawn relative to User Coordinate System or WorldCS.
param name="showOnOrigin">A boolean value representing if the axis will be drawn on the origin of selected Coordinate System on on the LowerLeft conrer of the screen.
param name="axiswidth">The width of the axis in pixels. The default VectorDraw axis is 5.0 pizels.
param name="axislength">The length of the axis in pixels. The default VectorDraw axis is 40.0 pizels.
public void DrawCCSAxis(vdRender render, bool DrawXAxis, bool DrawYaxis, bool DrawZaxis, bool DrawStrings,Color StringsColor ,Color XAxisColor, Color YAxisColor, Color ZAxisColor, bool showUserCS, bool showOnOrigin, double axiswidth, double axislength)
C# Example //Somewhere in your code initialize the DrawOverAll event doc.OnDrawOverAll += new vdDocument.DrawOverAllEventHandler(doc_OnDrawOverAll); Color StringsColor = Color.FromArgb(255, 144, 30); void doc_OnDrawOverAll(object sender, vdRender render, ref bool cancel) { vdDocument document = sender as vdDocument; bool showOrigin = true;//show axis icon in the LowerLeft corner bool showUserCS = true;//show axis relative to WorldCoordinateSystem document.ActiveLayOut.DrawCCSAxis(render, true, true, true, true,StringsColor, Color.Red, Color.Green, Color.Blue, showUserCS, showOrigin , 5.0 , 40.0); cancel = true; }