Article | 60001087 |
Type | Wish |
Product | Engine |
Version | 6017 |
Date Added | 2/17/2010 |
Fixed | Yes [2/18/2010] |
Submitted by | Bruce Jacobs |
Keywords |
In version 6018 Ruler object can be managed using vdraw.ocx Wrapper Control
as follow:
Example VB6:
VdProControl.tlb and vdScrollableControl.tlb must be added in the project references
Dim proctrl As VdProControl.VdProControl
Set proctrl = VdrawOcxControl.WrapperObject
''make the ruler visible
proctrl.RulerObject.Visible = True
''change the ruler background color to blue
proctrl.RulerObject.BackColor = &HFF0000
''select properties for displaying inches
''25 drawing units represents 1 ruler unit
proctrl.RulerObject.UnitScale = 25.4
''the number of tick marks between whole integer values
proctrl.RulerObject.TickMarks = 12
''the number of tick marks between decimal values
proctrl.RulerObject.FractionalTickMarks = 16
''decimal values are displayed as frctionals
proctrl.RulerObject.DecimalDisplayType = DisplayType_Fractional
Example VC++ 6:
#import "System.Drawing.tlb"
#import "mscorlib.tlb" rename("ReportEvent","_ReportEvent") rename("value","_value")
#import "C:\Program Files\VectorDraw\Common\6018\VectorDraw.Geometry.tlb" rename("value","_value")
#import "C:\Program Files\VectorDraw\Common\6018\VectorDraw.Render.tlb" rename("value","_value")
#import "C:\Program Files\VectorDraw\Common\6018\VectorDraw.Serialize.tlb"
#import "C:\Program Files\VectorDraw\Common\6018\VectorDraw.Professional.tlb" rename("entities","Entities") rename("GetEnvironmentVariable" , "_GetEnvironmentVariable") rename("value","_value")
#import "C:\Program Files\VectorDraw\Common\6018\vdDXF.tlb"
#import "C:\Program Files\VectorDraw\Common\6018\vdrawi5.tlb" rename("RGB","_RGB") rename("GetOpenFileName","_GetOpenFileName") rename("GetEnvironmentVariable","_GetEnvironmentVariable")
#import "C:\Program Files\VectorDraw\Common\6018\vdScrollableControl.tlb"
#import "C:\Program Files\VectorDraw\Common\6018\VdProControl.tlb"
.....................................
.....................................
VdProControl::_DVdrawPtr wrapper = VdrawOcxControl.GetWrapperObject();
//'make the ruler visible
wrapper->GetRulerObject()->PutVisible(VARIANT_TRUE);
//change the ruler background color to blue
wrapper->GetRulerObject()->PutBackColor(0xff0000);//BGR
//select properties for displaying inches
//25 drawing units represents 1 ruler unit
wrapper->GetRulerObject()->PutUnitScale ( 25.4);
//the number of tick marks between whole integer values
wrapper->GetRulerObject()->PutTickMarks( 12);
//the number of tick marks between decimal values
wrapper->GetRulerObject()->PutFractionalTickMarks ( 16);
//decimal values are displayed as frctionals
wrapper->GetRulerObject()->PutDecimalDisplayType(vdScrollableControl::DisplayType_Fractional);