Prod.: Engine, ver.: 6022, ID: 60001757, Wish : Is it possible to draw the CCS axis in specified size

Wish : Is it possible to draw the CCS axis in specified size

Article60001757
TypeWish
ProductEngine
Version6022
Date Added7/17/2012
FixedYes [7/19/2012]
Submitted byNabarun Saha
Keywords

Subject

Is it possible to draw the CCS axis in specified size

Summary

Is it possible to draw the CCS axis in specified size

Solution

In version 6023 we added a new override of DrawCCSAxis that contains the width and the length of the axis in pixels.

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="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 XAxisColor, Color YAxisColor, Color ZAxisColor, bool showUserCS, bool showOnOrigin, double axiswidth , double axislength)


This method can be used as below by overriding the DrawOverall event:

void BaseControl_DrawOverAll(object sender, vdRender render, ref bool cancel)
{
vdDocument document = sender as vdDocument;
document.ActiveLayOut.DrawCCSAxis(render, true, true, true, true, System.Drawing.Color.Red, System.Drawing.Color.Green, System.Drawing.Color.Blue, true, true,10.0,80.0);
cancel = true;
}