vdrawdich
TRANSCRIPT
Phần 1: VD Pro Component
I. Các thành viênPhương pháp chung:
AboutBox Hiển thị hộp thoại About
AttachMaterial Gắn một file ảnh vào một Vector Draw Color Index. Lặp lại việc gắn file ảnh với tất
cả các đối tượng với màu sắc xác định.
CreateInstance Tạo mới đối tượng VectorDraw
CreateNewVdFigure Tạo mới một đối tượng vdfigure mà chưa được thêm vào một tập hợp.
DetachMaterialXóa một file ảnh từ một Vector Draw Color Index. Tất cả các đối tượng với màu xác
định sẽ được hoàn trả với màu đặc của nó.
DoEvents Thực hiện tất cả các sự kiện của Windows trong hàng đợi .
DrawEntity Vẽ lại các thực thể đặc biệt
FreezeDrawEventsDisable (bFreeze=1)/Enable (bFreeze=0) các sự kiện Draw, DrawAfter, DrawEntity,
DrawAfterEntity, DrawBackground trong việc vẽ nhanh lại một số containers
FreezeEntityEvents
Disable (bFreeze = 1)/ Enable (bFreeze = 0) các sự kiện ReadXtraEntityValues,
AfterAddEntity, DefaultDimTxt, FilterFigure, AfterModify, BeforeModify,
AddEntity, EraseEntity cho việc vẽ nhanh trong một số containers
FreezeEvents Đóng băng/ Làm nóng tất cả các sự kiện.
GetColorTrasparency Lấy giá trị tham chiếu (0 - 1.0) cho chỉ số màu.
GetInterfaceInfoSử dụng các sự kiện như AddEntity, AfterAddEntity để tạo InterfaceInfo nếu
InterfaceInfo chưa tồn tại, cho phép truy cập các thuộc tính của đối tượng.
GetMaterialScale Lấy scale (co dãn) cho Material-Image của chỉ số id của màu.
GetUserValue Đọc một giá trị user string từ registry.
IsValidVDObject Kiểm tra nếu đối tượng là VDraw hợp lệ
KillTimer Xóa thời gian đã cài trước đó.
LoadMaterial Tải các ảnh từ một file.
PixelToVdView Đổi các pixel trong đơn vị vẽ
PostCommandId Thay thế id command của message trong hàng đợi message.
PostCommandStringGửi một chuỗi đến hàng đợi tin nhắn dòng lệnh của user (user command line message
queue). Nó rất có ích khi bạn thiết kế giao diện bằng dòng lệnh
Prompt Hiển thị tin nhắn trên thanh trạng thái status bar
Redraw Vẽ lại
ReFresh ReFresh vùng vẽ
ResetScrollPosition Đặt srcoll bars vào giữa.
RGBToVdColorIndex Tùy chỉnh màu RGB cho bảng màu VDraw
SaveMaterial Save ảnh vào một file.
Scroll Scrolls/Pan Viewing Window cho dx , dy trong Drawing Units
SetColorTrasparency Đặt giá trị Transparency (0 - 1.0) cho chỉ số màu.
SetEventParamValue
Sử dụng các sự kiện bên trong khi dùng JavaSscript hay VBScript để trả lại tham biến
BYREF, các giá trị double hoặc số nguyên được chuyển đổi một cách tự động từ giá
trị string của nó.
SetMaterialScale Đặt scale cho Material-Image của chỉ số id màu
SetProgressBarPercent Cập nhật vùng Status Bar Progress Meter mà tô màu hòan toàn trong vùn của nó
SetTimer Cài đặt thời gian mới cho hệ thống.
SizeToContent Thay đổi lại kích thước điều khiển của một cửa sổ xác định.
VdColorIndexToRGB Lấy giá trị RGB từ bảng màuVDraw
VdShellExecute Khởi động ứng dụng mới
VdViewToPixel Chuyển đổi đơn vị vẽ sang pixels
WriteUserValue Viết giá trị chuỗi vào registry.
Đặc tính chung
Actions Đối tượng vdActions
ActionValidates Lấy/ gán giá trị hợp lệ cho điều khiển sử dụng bit AND
ActiveDocument Đối tượng Active Document
AltTTFFontTrả lại hoặc gán thuộc tính font mặc định mà được sử dụng cho tên của style khi
textstyles lần đầu tiên được tạo
BackupOnSave Enable/Disable việc tạo bản backup với mỗi lần save
BorderStyleGán/Lấy kiểu đường viền điều khiển (0 = không có viền, 1= giống 3D , 2= giống
3D nhưng mỏng, 4 = mỏng và phẳng.
CommandAction Đối tượng CommandAction.
CrossSize Gán cross size trong pixels
CursorColor Lấy màu của kiểu con trỏ Cross-hair
CursorPos Trả lại vị trí con trỏ hiện tại trong tọa độ hiện tại của hệ thống của ActiveLayOut.
CurveResolution
Điều khiển sự xuất hiện của đường tròn, hình cung và hình ellipse sử dụng
vectors ngắng (1-20000)<500>. Vector càng lớn thì hình tròn hay hình vòng cung
càng nhẵn
DraggingObject Trả lại đối tượng vdDataObject Object của thao tác kéo.
DwgCodePage Gán/ lấy trang mã của hệ thống vẽ
DwgSaveVer Gán/ lấy phiên bản vẽ mặc định đã được save
EnableProgressBar Enable/Disable trạng thái của thanh progress bar
EnableToolTips Hiển thị tooltip khi con trỏ di chuyển qua đối tượng
EnableURLs Mở thuộc tính URL khi kích chuột trái vào đối tượng
FreezeDrawEntityEventsKhông cho phép/cho phép các sự kiện EntityDraw và DrawAfterEntity cho việc
vẽ lại nhanh hơn trong một số containers.
GripColor Lấy đối tượng Grip True Color
GripSize Gán/ lấy pixel trong kích cỡ của Grip
hDCView Trả lại thiết bị xử lí của window
hWndView Trả lại xử lí của window
ImageSaveQualityGán/ lấy quality được sử dụng khi save ảnh JPEG (từ 1 đến 100, giá trị mặc định
= 75>)
IMGSaveSizeGán/ lấy số pixel của Image Height mặc định khi save định dạng wmf/emf. Giá
trị càng lớn tức là xử lí càng tốt
LicVAL Được sử dụng trong vdrawnet ocx của web để gán giá trị licence
LoadingInfoMột văn bản Info được hiển thị khi chuẩn bị vẽ và việc xét tính hợp lệ sẽ có giá
trị là 256
MouseIcon Thuộc tính của MouseIcon là hợp lệ khi thuộc tính của MousePointer là 99
MouseIconFile Thuộc tính của MouseIconFile là hợp lệ khi thuộc tính của MousePointer là 99
MousePointerTrả lại hoặc gán một giá trị biểu thị kiểu của con trỏ chuột được hiển thị khi con
chuột được di chuyển qua các phần cụ thể của một đối tượng đang chạy
OSnapColor Lấy đối tượng Object Snap True Color
OSnapSize Gán/ lấy kích cỡ pixel của Object Snap
Palette Đối tượng vdPalette
PanWaitTime Với giá trị lớn hơn 0, lệnh pan sẽ được thực hiện mềm dẻo hơn
PenCaps Xác định chữ in hoa cuối cùng của dòng: tròn(=0), phẳng(=1)
PickSize Lấy kích cỡ của Pick dưới dạng pixels
PropFileName Chọn một bản vẽ mẫu
ReadyState Trả lại trạng thái đang nạp trong suốt quá trình download không đồng bộ
Render Đối tượng vdRender của bộ nhớ Bitmap
RubberBandColor Lấy màu của băng Rubber
SBBKCOLOR Lấy thanh trạng thái của màu nền
SBBORDERBKCOLOR Lấy thanh trạng thái của màu nền của viền
SBBORDERCOLOR Lấy thanh trạng thái của màu viền của khung
SBPROGRESSCOLOR Lấy thanh trạng thái của màu của progress bar
SBSTYLE Gán/ lấy kiểu của thanh trạng thái (0 = mặc định , 1 = Sử dụng màu ngẫu nhiên)
SBTEXTCOLOR Lấy màu của chữ trong thanh trạng thái.
SBTEXTFONTNAME Gán/ lấy tên TTF của chữ trong thanh trạng thái
ScreenRender Đối tượng vdRender của màn hình
ScrollBar Hiển thị/ Không hiển thị thanh cuốn: Thanh ngang= 1,dọc = 2, cả hai =3
ShowWCSAxis Enable/Disable icon của WCS Axis
StatusBar Enable/Disable thanh trạng thái
StatusBarOptionGrid Enable/Disable nút Grid của thanh trạng thái
StatusBarOptionOrtho Enable/Disable nút Ortho của thanh trạng thái
StatusBarOptionOsnap Enable/Disable nút Osnap của thanh trạng thái
StatusBarOptionSnap Enable/Disable nút Snap của thanh trạng thái
UndoMode Enable / disable chế độ undo
Utility Đối tượng Utility
VdrawRes Gán/ lấy tên file .Dll mà chứa tài nguyên của hộp thoại và tin nhắn
vdReadyState Trả lại trạng thái đang nạp trong suốt quá trình download không đồng bộ
version Trả lại phiên bản
Sự kiện chung:
AddEntity Kích hoạt trước khi một thực thể được thêm vào một tập hợp
AfterAddEntity Kích hoạt sau khi một thực thể được thêm vào một tập hợp
AfterModify Kích hoạt sau khi một đối tượng thay đổi một vài thuộc tính
AfterOpenDocument Kích hoạt sau khi khởi tạo tài liệu
BeforeModify Kích hoạt trước khi một đối tượng thay đổi thuộc tính. Gán kết thúc bẳng 1 nếu
bạn không muốn thay đổi thuộc tính của đối tượng.
BeforeOpenDocument Kích hoạt trước khi mở tài liệu
ChangeCoordChỉ kích hoạt trước khi tin nhắn xuất hiện trên mặt phẳng tọa độ của thanh trạng
thái, vì vậy bạn có thể thay đổi tin nhắn
CommandActionDraw Kích hoạt trước khi vẽ command-actions
CommandIdKích hoạt khi một tin nhắn từ phương pháp PostCommandId khi được sẵn sàng
để truyền đi
CoordMouseMove Xảy ra khi người sử dụng di chuyển chuột
CreateControl Kích hoạt Fires just sau khi Control Window được tạo và khởi tạo
DblClickXảy ra khi người sử dụng ấn và nhả chuột sau đó lại ấn và nhả chuột lên đối
tượng
DefaultDimTxt Xảy ra trước khi vẽ một khổ văn bản
Draw Xảy ra khi VDraw cập nhật một vùng hiển thị
DrawAfter Kích hoạt sau khi tất cả các thực thể đã được vẽ lên màn hình
DrawAfterEntity Xảy ra sau khi thực thể được vẽ lên màn hình
DrawBackground Xảy ra khi màu nền cửa sổ VDraw cần xóa đi (ví dụ khi thay đổi kích cỡ cửa sổ).
DrawGripsEx Xảy ra trước khi các rãnh của vdFigure object được vẽ
DrawOsnap Xảy ra trước khi osnaps được vẽ
DrawOverAll Kích họat khi vẽ xong tất cả và có thể sử dụng cho biểu diễn các icon UCS bất kì
EntityDraw Xảy ra khi hình dạng được vẽ
EraseEntity Kích hoạt trước khi một thực thể bị xóa ra khỏi tập hợp
FilterFigureKhi một hình dạngđược chọn ví dụ lệnh di chuyển, copy, co giãn, xoay, chọn ..
hay khi người sử dụng chọn một thực thể đơn
FilterPointOccurs when a command job which waiting a point, is active and the user has
already pick or type the coordinates
GetGripPoints Ghi đè lên thuộc tính của Grips của vdFigure
GetOpenFileFilterFormat Kích họat trước khi mở hộp thoại file mặc định chung
GetPassword Được gọi để những bản vẽ có mật khẩu bảo vệ
GetSaveFileFilterFormat Khởi tạo trước khi ghi file mặc định chung
IsValidOpenFormat Hỏi lại khi một file mở rộng hợp lệ cho việc mở
JobEnd Kích hoạt sau khi một một phương pháp lệnh của VDCOMMAND kết thúc
JobError Kích hoạt khi xảy ra một lỗi trong phương pháp lệnh của VDCOMMAND
JobKeyDownXảy ra khi một lệnh hoạt động và người sử dụng ấn một phím không của hệ
thống
JobKeyPressXảy ra khi một lệnh hoạt động và người sử dụng ấn một phím không của hệ
thống
JobLoopXảy ra khi một lệnh trong vòng lặp đợi người sử dụng ấn chuột hoặc bàn phím
Đặt kết thúc bằng 1 để ngắt vòng lặp
JobMouseDown Xảy ra khi một lệnh hoạt động và người sử dụng ấn chuột
JobPromptChỉ kích hoạt trước khi tin nhắn xuất hiện trong thanh trạng thái vì vậy bạn có thể
thay đổi tin nhắn này
JobStart Chỉ kích hoạt trước khi lệnh công việc của VDCOMMAND bắt đầu
KeyDown Xảy ra khi người sử dụng ấn một phím trong khi đối tượng đang được xét
KeyPress Xảy ra khi người sử dụng ấn và thả phím ANSI
KeyUp Xảy ra khi người sử dụng thả một phím trong khi đối tượng đang được xét
LeftMouseButtonDown Xảy ra khi chuột trái được ấn
MouseDown Xảy ra khi người sử dụng ấn chuột trái
MouseMove Xảy ra khi người sử dụng di chuyển chuột
MouseUp Xảy ra khi người sử dụng nhả chuột
MouseWheel Kích hoạt trước khi tin nhắn WM_MOUSEWHEEL bị ảnh hưởng
MoveGripPointsAtEx Xảy ra trước khi gọi phương pháp MoveGripPointsAt của vdFigure
NeedFileConvert Kích hoạt khi một file định dạng được mở
NeedHelp Kích hoạt khi người sử dụng ấn phím F1 trong một hộp thoại xác định
NoFileFindKích hoạt nếu vdraw không thể tìm thấy tên file. Ví dụ sau phương pháp
AddFromFile, thay đổi FileName bằng một file đã tồn tại và gán retValue bằng 1
OpenURLKích hoạt trước khi một URL của một thực thể sắp được mở. Thay đổi tên URL
bằng tên URL khác
ProgressBarPercentKích họat trước khi điều khiển gửi một tin nhắn phần trăm đến thanh trạng thái
(phần trăm = 0 - 100)
ReadyStateChange Kích hoạt khi trạng thái tải về bị thay đổi trong quá trình tải không đồng bộ
ScreenPaint Kích hoạt với tất cả tin nhắn của cửa sổ WM_PAINT
ScrollViewKích hoạt trước khi cuốn view sử dụng lệnh ScrollBars MouseWheel hoặc Pan,
dx / dy liên quan tới khoảng cách cuộn thanh ngang/ dọc trong Drawing Units.
SizeWindow Xảy ra trước khi hoạt động mặc định cho cửa sổ vdraw window thay đổi.
TimerKích hoạt khi hàng đợi tin nhắn trống và thời gian ( được xét trong SetTimer
trước đó) bị quá hạn
UpdateDlgData
Kích hoạt khi giá trị của máy in Printer MM trong hộp thoại Print Preview được
khởi tạo (SaveAndValidateFlag = 0) hoặc đang được lấy về
(SaveAndValidateFlag = 1). Sử dụng cho chuyển đổi các đơn vị khác nhau
VDDragDrop Xảy ra khi hành động kéo thả được hoàn thành
VDDragDropExKích hoạt khi hành động thả xảy ra. Thông thường, sau khi di chuyển con trỏ qua
một nút trong khi đang thả, xử lí sẽ bị ảnh hưởng
VDDragEnterEx Kích hoạt khi con trỏ được kéo lần đầu tiên vào trong cửa sổ
VDDragLeaveEx Kích hoạt khi con trỏ ra khỏi cửa sổ trong khi đang kéo, xử lí sẽ bị ảnh hưởng
VDDragOver Occurs when the cursor is dragged over the Vdraw window
VDDragOverEx Kích hoạt khi con trỏ bị kéo qua cửa sổ
Có thể xem trong
VDPro
II. Giao diện
Thành viên:
vdFilterObject VectorDraw Filter object
vdPrimary VectorDraw Primitive Object
vdXProperties VectorDraw vdXProperties collection
vdXProperty VectorDraw Xproperty Object
vdSectionClip VectorDraw Section Clipping object
vdxyz VectorDraw XYZ object (Coordinates of a point)
vdmatrix VectorDraw MATRIX object
vdSectionClips VectorDraw Section Clipping collection
vdLight VectorDraw Light Object
vdLights VectorDraw Lights collection
vdxyzlist VectorDraw XYZ point collection
vdFigure VectorDraw general Object
vdColor VectorDraw Color object
vdPalette VectorDraw Palette object
vdLayer VectorDraw Layer Object
vdPolyface VectorDraw PolyFace Object
vdTextstyle VectorDraw Textstyle Object
vdRender VectorDraw Render Object
vdLine VectorDraw Line Object
vdPolyline VectorDraw PolyLine Object
vdHatchPattern VectorDraw Hatch pattern Definition object.
vdArc VectorDraw Arc Object
vdCircle VectorDraw Circle Object
vdEllipse VectorDraw Ellipse Object
vdRect VectorDraw Rect Object
vdImage VectorDraw Image Object
vdPoint VectorDraw Point Object
vd3DFace VectorDraw 3dface Object
vdViewport VectorDraw ViewPort Object
vdText VectorDraw Text Object
vdAttrib VectorDraw Attribute Object
vdDimension VectorDraw Dimension Object
vdInsert VectorDraw Insert Object
vdPolyhatch VectorDraw PolyHatch Object
vdTextstyles VectorDraw Textstyles collection
vdDimstyle VectorDraw Dimstyle Object
vdDimstyles VectorDraw Dimstyles collection
vdBlock VectorDraw Block Object
vdLayers VectorDraw Layers collection
vdDocument VectorDraw Document Object
vdBlocks VectorDraw Blocks collection
vdEntities VectorDraw Entities collection
vdPrint VectorDraw Printer Object
vdSelections VectorDraw Selections collection
vdSelection VectorDraw Selection collection
vdLayouts VectorDraw LayOuts collection
vdLayout VectorDraw LayOut Object
vdImages VectorDraw Images collection object.
vdImageDef VectorDraw Image Definition object.
vdLineTypes VectorDraw Line types collection object.
vdLineType VectorDraw Line type Definition object.
vdHatchPatterns VectorDraw Hatch patterns collection object.
vdCommand VectorDraw CommandAction Object
vdUtility VectorDraw Utility Object
vdActions VectorDraw Actions object
vdDataObject VectorDraw DataObject
III. Hằng số
Thành viên
VdConstDimTextHorRot Dimension TextHorRotation Constants
VdConstDimTextVerJust Dimension TextVerJust Constants
VdConstUCSIcon ShowWCSAxis Constants
VdConstPenCaps PenCaps Constants
VdConstLineWeight LineWeight Constants
VdConstCodePage CodePage Constants
VdConstXYZFlag XYZ object Falg Constants
VdConstShowEdge ShowEdge Constants
VdConstPerspectiveMod Perspective Mode Constants
VdConstLWDisplay lineWeightDispaly Constants
VdConstAngDir Angle direction Constants
VdConstSnapStyle Snap style Constants
VdConstSnapIso Snap ISO Constants
VdConstGripBlock Grip block Constants
VdConstGripSnap Grip Snap Constants
VdConstXrefFlag External Block reference Constants
VdConstTextstyleFlag TextStyle flag Constants
VdConstCoordMode CoordMode Constants
VdConstSplineFlag Spline Flag Constants
VdConstPlineFlag Polyline Flag Constants
VdConstDimZin DimZin Constants
VdConstDimAZin DimaZin Constants
VdConstJob Job Event constants
VdConstJobError Job Error Event Constants
VdConstFilterFig FilterFigure Event Constants
VdConstModify Modify Event Constants
VdConstDimOverWrite Dim Overwrite Constants
VdConstPrinterCapability Capabilities of a printer device driver
VdConstPrintOrient Printer Orientation COnstants
VdConstPrintDev Printer Device Constants
VdConstDlgData Dialog Contants
VdConstInters Used in IntersectWith method
VdConstImg Used in dispaly property of VDIMAGE
VdConstFileVer Used in SaveAs method
VdConstHighLight Used in HighLight property
VdConstPen Used in PenStyle property
VdConstColor Used in PenColor and ActiveColor property
VdConstHorJust Used in HorJustify and ActiveTextHorJustify property
VdConstVerJust Used in VerJustify and ActiveTextVerJustify property
VdConstOsnap Used in OsnapMode property
VdConstFill Used in FillMode and ActiveFillMode property
VdConstTxtStylExtra Used in Extra property of textstyle object
VdConstMouse MousePointer constants
VdConstPrintMode Print mode constants
VdConstDrawMode Draw mode constants
VdConstMixMode Pen mix mode constants
VdConstCmdActions Command Action constants
VdConstObjectType Object type constants
VdConstXPropType vdXproperty type constants
VdConstLunits Linear unit constants
VdConstAunits Angular unit constants
VdConstDimType Dimension type constants
VdConstSpaceMode SpaceMode constants
PrinterFlag PrinterFlag constants
VdDropEffect Drag and Drop constants
VdConstFileError Open/Save File error constants
VdConstExplodeEx ExplodeEx Constants
Constants VectorDraw OLE Control defined constants
IV. Mới:
Mới trong 5.1.1.1039
FreezeDrawEntityEventsDisable/ Enable các sự kiện của EntityDraw và DrawAfterEntity cho việc vẽ
lại nhanh hơn trong một số containers.
MoveBefore Di chuyển vị trí sourceObj đến trước vị trí của destObj trong tập hợp
MoveAfter Di chuyển vị trí của sourceObj đến sau vị trí của destObj trong tập hợp
SolidFillTransparency Xác định độ trong của các hình được điền vào các thực thể (0 - 255)
EnableDrawPatternMethod2 Điều khiển phương pháp vẽ của tất cả các dòng mẫu đã được điền vào
DrawPatternMethod2 Điều khiển phương pháp vẽ của một dòng mẫu đã được điền vào
Mới trong 5.1.1.1038
XrefDocument Lấy đối tượng vdDocument cho việc vẽ đính kèm xref
DisableZoomOnResize Điều khiển sự phóng to – thu nhỏ của việc khi thay đổi kích cỡ của biểu mẫu
Mới trong 5.1.1.1037
MatrixPropertiesTrả về tỉ lệ, độ quay của trục Z, khoảng trống ban đầu của ma trận của
doubles.
ShowBoundary Điều khiển sự hiển thị của đường biên đã được điền vào
DisableShowPrinterPaper Điều khiển việc layout sẽ hiển thị trên giấy in hoặc trong nền đen
EnableUndoWriteIfGroupOnly Chỉ viết bộ nhớ Undo nếu một CommandActiond Undo Begin được mở
MirrorText Điều khiển việc các văn bản phản chiếu lệnh CmdMirror
GetPolyFace IDH_FIG_GETPOLYFACE
Mới trong 5.0.1.1037
GetOsnapDialog IDH_UTILITY_GETOSNAPDLG
IntersectWith IDH_UTILITY_INTERSECTWITH
SaveMaterial IDH_VDRAW_SAVEMATERIAL
LoadMaterial IDH_VDRAW_LOADMATERIAL
DrawOsnap IDH_EVENT_DRAWOSNAP
Elevation IDH_LAYOUT_ELEVATION
PolarTrackAngle IDH_DOCUMENT_POLARTRACKANGLE
PolarTrack IDH_DOCUMENT_POLARTRACK
NeedHelp IDH_VDRAW_NEEDHELP
ActivePaperHeight IDH_PRINT_ACTIVEPAPERHEIGHT
ActivePaperWidth IDH_PRINT_ACTIVEPAPERWIDTH
Mới trong 5.0.1.1036
EnableMonochrome3DImage IDH_ACTIONS_ENABLEMONOCHROME3DIMAGE
Mới trong 5.0.1.1035
ExplodeEx IDH_DOCUMENT_EXPLODEEX
FontFullName IDH_TEXTSTYLE_FONTFULLNAME
HasOverWriteValue IDH_DIMENSION_HASOVERWRITEVALUE
RedrawByWindowRect IDH_ACTIONS_REDRAWBYWINDOWRECT
DisableVdrawDxf IDH_ACTIONS_DISABLEVDRAWDXF
ConvertString IDH_UTILITY_CONVERTSTRING
Mới trong 5.0.1.1034
GetDeviceCapabilities IDH_PRINT_GETDEVICECAPABILITIES
Paper IDH_PRINT_PAPER
GetHatchPattern IDH_ARC_GETHATCHPATTERN
SetHatchPattern IDH_ARC_SETHATCHPATTERN
Transformby IDH_HATCHPATTERN_TRANSFORMBY
RemoveAllLines IDH_HATCHPATTERN_REMOVEALLLINES
GetLineDefinitionAt IDH_HATCHPATTERN_GETLINEDEFINITIONAT
AddLineDefinition IDH_HATCHPATTERN_ADDLINEDEFINITION
NumLines IDH_HATCHPATTERN_NUMLINES
ClipBoundary IDH_IMAGE_CLIPBOUNDARY
geomDegreesToRad IDH_UTILITY_GEOMDEGREESTORAD
geomRadToDegrees IDH_UTILITY_GEOMRADTODEGREES
geomFixAngle IDH_UTILITY_GEOMFIXANGLE
geomPI IDH_UTILITY_GEOMPI
CommandId IDH_EVENT_COMMANDID
PostCommandId IDH_VDRAW_POSTCOMMANDID
Generate3dPathSection IDH_UTILITY_GENERATE3DPATHSECTION
SetTextAt IDH_LINETYPE_SETTEXTAT
GetTextAt IDH_LINETYPE_GETTEXTAT
SetShapeRotationAt IDH_LINETYPE_SETSHAPEROTATIONAT
GetShapeRotationAt IDH_LINETYPE_GETSHAPEROTATIONAT
SetShapeScaleAt IDH_LINETYPE_SETSHAPESCALEAT
GetShapeScaleAt IDH_LINETYPE_GETSHAPESCALEAT
SetShapeOffsetAt IDH_LINETYPE_SETSHAPEOFFSETAT
GetShapeOffsetAt IDH_LINETYPE_GETSHAPEOFFSETAT
SetShapeNumberAt IDH_LINETYPE_SETSHAPENUMBERAT
GetShapeNumberAt IDH_LINETYPE_GETSHAPENUMBERAT
SetShapeStyleAt IDH_LINETYPE_SETSHAPESTYLEAT
GetShapeStyleAt IDH_LINETYPE_GETSHAPESTYLEAT
SetFlagAt IDH_LINETYPE_SETFALG
GetFlagAt IDH_LINETYPE_GETFLAG
GetFileProperties IDH_UTILITY_GETFILEPROPERTIES
GetPassword IDH_EVENT_GETPASSWORD
CursorColor IDH_VDRAW_CURSORCOLOR
RubberBandColor IDH_VDRAW_RUBBERBANDCOLOR
GripSnap IDH_DOCUMENT_GRIPSNAP
Mới trong 5.0.0.1034
EnableFullCircleArc IDH_ACTIONS_FULLCIRCLEARC
ColorValue IDH_COLOR_COLORVALUE
TransformPt IDH_MATRIX_TRANSFORMPT
Mới trong 5.0.0.1033
IsPointVisible IDH_REND_ISPOINTVISIBLE
DrawOverAll IDH_EVENT_DRAWOVERALL
DimLineColor IDH_DIMSTYLE_DIMLINECOLOR
PostString IDH_DIMSTYLE_POSTSTRING
InitUserGetString IDH_COMMAND_INITUSERGETSTRING
EnableSyncOpen IDH_ACTIONS_SYNCOPEN
Reverse IDH_POLYLINE_REVERSE
BulgeList IDH_POLYLINE_BULGELIST
GetFormattedText IDH_DIMENSION_FORMATEDTEXT
BackupOnSave IDH_DOCUMENT_BACKUPONSAVE
Copies IDH_PRINT_COPIES
CopyFrom IDH_LINETYPE_COPYFROM
Palette IDH_COLOR_PALETTE
CopyFrom IDH_COLOR_COPYFROM
GetColorDlgEx IDH_UTILITY_GETCOLOREX
Select_PenEx IDH_REND_SPENEX
BeginFillRegionEx IDH_REND_BEGINPATHEX
LockPenEx IDH_REND_LOCKPENEX
ClearBkColorEx IDH_REND_CLRBKCOLEX
ByLayer IDH_COLOR_BYLAYER
ByBlock IDH_COLOR_BYBLOCK
RGB IDH_COLOR_RGB
Blue IDH_COLOR_BLUE
Green IDH_COLOR_GREEN
Red IDH_COLOR_RED
ColorIndex IDH_COLOR_COLORINDEX
StringValue IDH_COLOR_STRINGVALUE
vdColor IDH_VDCOLOR
GetHatchPatternDlg IDH_UTILITY_GETHATCHPATTERNDLG
Index IDH_LINETYPE_ID
HatchPatterns IDH_DOCUMENT_HATCHPATTERNS
LineTypes IDH_DOCUMENT_LINETYPES
PatternLines IDH_HATCHPATTERN_PATTERNLINES
Name IDH_HATCHPATTERN_NAME
vdHatchPattern IDH_VDHATCHPATTERN
vdHatchPatterns IDH_VDHATCHPATTERNS
SegmentLength IDH_LINETYPE_LENGTH
GetDashAt IDH_LINETYPE_GETDASHAT
SetDashAt IDH_LINETYPE_SETDASHAT
NumDashes IDH_LINETYPE_NUMDASHES
Comments IDH_LINETYPE_COMMENTS
Name IDH_LINETYPE_NAME
vdLineType IDH_VDLINETYPE
vdLineTypes IDH_VDLINETYPES
Images IDH_DOCUMENT_IMAGES
Quality IDH_IMAGEDEF_QUALITY
GetNearestColorId IDH_PALETTE_NEARESTCOLOR
ExportToFile IDH_IMAGEDEF_EXPORT
Transparency IDH_IMAGEDEF_TRANSPARENCY
NumColors IDH_IMAGEDEF_NUMCOLORS
Height IDH_IMAGEDEF_HEIGHT
Width IDH_IMAGEDEF_WIDTH
Name IDH_IMAGEDEF_NAME
Purge IDH_IMAGES_PURGE
vdImageDef IDH_VDIMAGEDEF
vdImages IDH_VDIMAGES
EnableAutoNormal IDH_ACTIONS_ENABLEAUTONORMAL
BorderStyle IDH_VDRAW_BORDERSTYLE
SBSTYLE IDH_VDRAW_SBSTYLE
SBTEXTFONTNAME IDH_VDRAW_SBTEXTFONTNAME
SBPROGRESSCOLOR IDH_VDRAW_SBPROGRESSCOLOR
SBBORDERBKCOLOR IDH_VDRAW_SBBORDERBKCOLOR
SBBORDERCOLOR IDH_VDRAW_SBBORDERCOLOR
SBTEXTCOLOR IDH_VDRAW_SBTEXTCOLOR
SBBKCOLOR IDH_VDRAW_SBBKCOLOR
ExportToFile IDH_DOCUMENT_EXPORTTOFILE
ImageSaveQuality IDH_VDRAW_IMAGESAVEQUALITY
GetGripPoints IDH_EVENT_GETGRIPPOINTS
DrawGripsEx IDH_EVENT_DRAWGRIPS
MoveGripPointsAtEx IDH_EVENT_MOVEGRIPPOINTSAT
DimTm IDH_DIMSTYLE_DIMTM
DimaZin IDH_DIMSTYLE_DIMAZIN
DimZin IDH_DIMSTYLE_DIMZIN
Mới trong 4.2.6.1031
GetSaveFileFilterFormat IDH_EVENT_SAVEFORMATFILTER
IsValidOpenFormat IDH_EVENT_ISVALIDOPENFORMAT
VdShellExecute IDH_VDRAW_SHELLEXECUTE
GetOpenFileFilterFormat IDH_EVENT_OPENFORMATFILTER
NeedFileConvert IDH_EVENT_USERFILEOPEN
JoinSelection IDH_UTILITY_JOINSELECTION
Mới trong 4.1.6.1030
GetSamplePoints IDH_FIG_SAMPLEPOINTS
FilterPretranslateMessages IDH_ACTIONS_FILTERPRETRANSLATEMESSAGES
SetDefault IDH_PALETTE_SETDEFAULT
Mới trong 4.1.6.1029
ExportDistributionFiles IDH_DOCUMENT_EXPORTDISTRIBUTIONFILES
MouseIconFile IDH_VDRAW_MOUSEICONFILE
Mới trong 4.0.5.1024
WriteUserValue IDH_VDRAW_WRITEUSERVALUE
GetUserValue IDH_VDRAW_GETUSERVALUE
BlockColorOper IDH_DOCUMENT_BLOCKCOLOROPER
GetLineTypeDlg IDH_UTILITY_GETLINETYPEDLG
VdrawClipboardFormat IDH_DATAOBJECT_VDRAWCLIPFORMAT
DraggingObject IDH_VDRAW_ACTIVEDRAGDROPOBJECT
VDDragLeaveEx IDH_EVENT_VDDRAGLEAVEEX
VDDragDropEx IDH_EVENT_VDDRAGDROPEX
VDDragOverEx IDH_EVENT_VDDRAGOVEREX
VDDragEnterEx IDH_EVENT_VDDRAGENTEREX
FindItemType IDH_DATAOBJECT_FINDITEM
GetItem IDH_DATAOBJECT_GETITEM
vdDataObject IDH_DATAOBJECT
Flag IDH_PRINT_FLAG
DisableSaveImageList IDH_ACTIONS_DISABLESAVEIMAGELIST
WidenLinePreview IDH_ACTIONS_WIDENLINEPREVIEW
AddFromMemory IDH_COLLECT_ADDFROMMEMORY
DoDragDrop IDH_COMMAND_DODRAGDROP
Mới trong 4.0.4.1023
PreviewDlgInit IDH_PRINT_PREVIEWDLGINIT
Union IDH_POLYLINE_UNION
CLOCKWISE IDH_POLYLINE_CLOCKWISE
Break IDH_FIG_BREAK
TopMostToolTip IDH_ACTIONS_TOPMOSTTOOLTIP
Mới trong 4.0.3.1022
Palette IDH_VDRAW_PALETTE
vdPalette IDH_VDPALETTE
ApplyFilter IDH_SELSET_APPLYFILTER
UnLockPen IDH_REND_UNLOCKPEN
LockPen IDH_REND_LOCKPEN
Mới trong 4.0.2.1020
FileError IDH_DOCUMENT_FILEERROR
BkColorEx IDH_BKCOLOREX
FreezeEvents IDH_VDRAW_FREEZEEVENTS
ExtrudeMatrix IDH_MATRIX_EXTRUD
Deleted IDH_FIG_DELETED
Mới trong 4.0.1.1019
geom3PointCenter IDH_UTILITY_GEOM3POINTCENTER
geomMidPoint IDH_UTILITY_GEOMMIDPOINT
Mới trong 4.0.1.1018
TranslateKeyEvents IDH_ACTIONS_TRANSLATEKEYEVENTS
ScreenPaint IDH_EVENT_SCREENPAINT
ScreenRender IDH_VDRAW_SCREENRENDER
FileProperties IDH_DOCUMENT_FILEPROPS
KeepAttributeHeight IDH_DOCUMENT_ATTRIBHEIGHT
InverseMouseWheelZoom IDH_ACTIONS_INVERSEMOUSEWHEELZOOM
Mới trong 4.0.0.1013
RenderToBitmap IDH_SELSET_RENDET2BMP
PrinterName IDH_PRINT_PRINTERNAME
EnableTTF3dText IDH_ACTIONS_ENABLETTF3DTEXT
Mới trong 4.0.0.1012
Cancel1 IDH_COMMAND_CANCEL1
DrawEntity IDH_REND_DRAWENTITY
Mode IDH_PRINT_MODE
TransBoundary IDH_LAYOUT_TRANS_BOUND
GripBlock IDH_DOCUMENT_GRIPBLOCK
PanWaitTime IDH_VDRAW_PANWAITTIME
Rp2World IDH_LAYOUT_RP2WORLD
IgnoreLockLayers IDH_ACTIONS_IGNORELOCKLAYERS
KillTimer IDH_VDRAW_KILLTIMER
SetTimer IDH_VDRAW_SETTIMER
Timer IDH_EVENT_TIMER
DisableSavePreview IDH_ACTIONS_DISABLESAVEPREVIEW
GetMouseOverEntity IDH_DOCUMENT_MOUSEOVER
DisableMouseWheelPan IDH_ACTIONS_MOUSEWHEELSCROLL
SetPosition IDH_COLLECT_SETPOS
Actions IDH_VDRAW_ACTIONS
Clear IDH_ACTIONS_CLEAR
EnableTransparentTestImages IDH_ACTIONS_TRANSPIMAGE
EnableExplodeDimensions IDH_ACTIONS_DIMENSIONS
EnableFileFromCache IDH_ACTIONS_CACHE
DisableXrefToolTips IDH_ACTIONS_TOOLTIPS
DisableMouseStockEvents IDH_ACTIONS_MOUSE
EnableAutoFocus IDH_ACTIONS_FOCUS
EnableAsyncOpen IDH_ACTIONS_ASYNC
DisableUndoWrite IDH_ACTIONS_UNDOWRITE
Disable3d IDH_ACTIONS_3D
DisableOsnapDialog IDH_ACTIONS_OSNAPDLG
DisableUndoGroup IDH_ACTIONS_UNDOGROUP
DisableRedraw IDH_ACTIONS_REDRAW
vdActions IDH_ACTIONS
CursorPos IDH_VDRAW_CURSORPOS
Rotations IDH_MATRIX_ROTATIONS
TransPoint IDH_LAYOUT_TRANS_PT
TransEntity IDH_LAYOUT_TRANS_ENT
ShowGrips IDH_SELSET_SHOWGRIPS
Visible IDH_FILTER_VISIBLE
Previous IDH_COLLECT_PREV
Next IDH_COLLECT_NEXT
Last IDH_COLLECT_LAST
Start IDH_COLLECT_START
CreateFilter IDH_SELSETLIST_CREATEFILTER
NestedObjects IDH_FILTER_NESTEDOBJECTS
XProperties IDH_FILTER_XPROPNAMES
PenColors IDH_FILTER_PENCOLORS
Blocks IDH_FILTER_BLOCKNAMES
DimStyles IDH_FILTER_DIMSTYLE
TextStyles IDH_FILTER_TEXTSTYLE
PenStyles IDH_FILTER_PENSTYLE
Labels IDH_FILTER_LABEL
Types IDH_FILTER_TYPE
Layers IDH_FILTER_LAYER
LayOuts IDH_FILTER_LAYOUT
vdFilterObject IDH_FILTEROBJECT
FilterSelect IDH_SELSETLIST_FILTER
DefPoint4 IDH_DIMENSION_DEFPT4
DefPoint3 IDH_DIMENSION_DEFPT3
TransformMatrix IDH_INSERT_TRANSMAT
GetFilterData IDH_XPROPERTYLIST_FILTER
Name IDH_XPROPERTY_NAME
ReFresh IDH_VDRAW_REFRESH
DrawImage IDH_REND_IMAGE
GetEntityFromPointEx IDH_DOCUMENT_ENTFROMPTEX
SnapBase IDH_DOCUMENT_SNAPBASE
SnapIso IDH_DOCUMENT_SNAPISO
SnapStyle IDH_DOCUMENT_SNAPSTYL
SnapAngle IDH_DOCUMENT_SNAPANGLE
GetSnapSpace IDH_DOCUMENT_GETSNAPSPACE
GetGridSpace IDH_DOCUMENT_GETGRIDSPACE
SetSnapSpace IDH_DOCUMENT_SETSNAPSPACE
SetGridSpace IDH_DOCUMENT_SETGRIDSPACE
Flag IDH_POLYLINE_FLAG
NormalizeVector IDH_UTILITY_NORMALIZEVECTOR
SetValueEx IDH_XYZLIST_VALUEEX
LoadingInfo IDH_VDRAW_LOADINFO
GetTextSize IDH_REND_GETTEXTSIZE
CommandActionDraw IDH_EVENT_CMDUIDRAW
Matrix IDH_LAYOUT_MATRIX
Matrix IDH_REND_MATRIX
Enable IDH_SECTCLIP_ENABLE
Direction IDH_SECTCLIP_DIR
OriginPoint IDH_SECTCLIP_ORG
Name IDH_SECTCLIP_NAME
ClearFillRegion IDH_REND_DELPATH
FillRegion IDH_REND_FILLPATH
CombineFillRegion IDH_REND_COMBINEPATH
BeginFillRegion IDH_REND_BEGINPATH
GetViewCenter IDH_REND_VCEN
ViewToWorld IDH_REND_VIEW2W
WorldToView IDH_REND_W2VIEW
SelectWorldMatrix IDH_REND_SELECTWMAT
PopMatrix IDH_REND_POP
PushMatrix IDH_REND_PUSH
GetWindowExt IDH_REND_WINEXT
ClearBkColor IDH_REND_CLRBKCOL
DrawMode IDH_REND_DRAWMOD
PrinterMode IDH_REND_PRINTERMOD
Drawcircle IDH_REND_DRAWCIRCLE
Drawarc IDH_REND_DRAWARC
Drawtext IDH_REND_DRAWTEXT
Drawpolyline IDH_REND_DRAWPOLY
Drawline IDH_REND_DRAWLINE
Setrop IDH_REND_SETROP
Lineto IDH_REND_LINETO
Moveto IDH_REND_MOVETO
Select_Pen IDH_REND_SPEN
Height IDH_REND_HEIGHT
Width IDH_REND_WIDTH
Top IDH_REND_TOP
Left IDH_REND_LEFT
PixelSize IDH_REND_PIXSIZE
Hdc IDH_REND_HDC
z IDH_XYZ_Z
y IDH_XYZ_Y
x IDH_XYZ_X
Flag IDH_XYZ_FLAG
Transformby IDH_XYZLIST_TRANS
Value IDH_XYZLIST_VARTYPE
Inverse IDH_MATRIX_INV
Mult IDH_MATRIX_MULTI
ScaleMatrix IDH_MATRIX_SCALE
Translate IDH_MATRIX_TRANS
RotateZ IDH_MATRIX_ROTZ
RotateY IDH_MATRIX_ROTY
RotateX IDH_MATRIX_ROTX
Init IDH_MATRIX_INIT
CreateInstance IDH_VDRAW_CREATENEWOBJ
Item IDH_MATRIX_ITEM
vdmatrix IDH_MATRIX
vdxyz IDH_XYZ
vdxyzlist IDH_XYZLIST
Sections IDH_LAYOUT_SECTIONS
RemoveAll IDH_COLLECT_REMOVEALL
vdSectionClip IDH_SECTION
vdSectionClips IDH_SECTIONS
Model IDH_DOCUMENT_MODEL
Render IDH_VDRAW_RENDER
PixelToView IDH_REND_PIXEL2VDVIEW
ViewToPixel IDH_REND_VDVIEW2PIXEL
vdRender IDH_VDRENDER
AboutBox IDH_VDRAW_ABOUT
vdPrimary IDH_PRIMITIVE
ClearUndoMem IDH_DOCUMENT_CLEARUNDO
grDrawArc IDH_UTILITY_GRDRAWARC
SpaceMode IDH_LAYOUT_SPACEMOD
ActiveViewPort IDH_LAYOUT_ACTIVEVPORT
SetDimOverWriteValue IDH_DIM_SETOVRWPROP
GetDimOverWriteValue IDH_DIM_GETOVRWPROP
DimTp IDH_DIMSTYLE_DIMTP
DimTol IDH_DIMSTYLE_DIMTOL
AStringUnits2Real IDH_UTILITY_ASTRTOREAL
AReal2StringUnits IDH_UTILITY_AREALTOSTR
LStringUnits2Real IDH_UTILITY_LSTRTOREAL
LReal2StringUnits IDH_UTILITY_LREALTOSTR
DimLunit IDH_DIMSTYLE_DIMLUNIT
DimAdec IDH_DIMSTYLE_DIMADEC
DimAunit IDH_DIMSTYLE_DIMAUNIT
LineIsInvisible IDH_DIMSTYLE_LINEISVISIBLE
Luprec IDH_DOCUMENT_LUPREC
Lunits IDH_DOCUMENT_LUNITS
Auprec IDH_DOCUMENT_AUPREC
Aunits IDH_DOCUMENT_AUNITS
Angdir IDH_DOCUMENT_ANGDIR
Angbase IDH_DOCUMENT_ANGBASE
AlignmentPoint IDH_TEXT_ALIGNPOINT
WidthFactor IDH_TEXTWFACTOR
Flag IDH_TEXTSTYLE_FLAG
BigFontFile IDH_TEXTSTYLE_BIGFONTFILE
FindFile IDH_UTILITY_FINDFILE
GetFonts IDH_UTILITY_GETFONTS
FilterPoint IDH_EVENT_FILTERPOINT
LastPoint IDH_DOCUMENT_LASTPT
GetColorTrasparency IDH_VDRAW_COLORTRANSPARENT_GET
SetColorTrasparency IDH_VDRAW_COLORTRANSPARENT_SET
GetNearestPoint IDH_POLYLINE_NEAPOINT
MaxBitmapSize IDH_PRINT_BMPSZ
UndoLimit IDH_DOCUMENT_UNDOLIMIT
hatchAngle IDH_ARC_HATCHANGLE
AddDimAngular IDH_ENTITYLIST_ADDDIMANG
GetLineWeightDlg IDH_UTILITY_GETLWDLG
LineWeightDisplay IDH_DOCUMENT_LWDISP
DefaultLineWeight IDH_DOCUMENT_DEFLW
LineWeight IDH_FIG_LWEIGHT
LineTypeScale IDH_FIG_LTSCALE
Scroll IDH_VDRAW_SCROLL
GetLineTypeProperties IDH_UTILITY_GETLINETYPEPROPERTIES
ModifyLineType IDH_UTILITY_MODIFYLINETYPE
FreezeEntityEvents IDH_VDRAW_FREEZEENTITYEVENTS
FreezeDrawEvents IDH_VDRAW_FREEZEDRAWEVENTS
FileVersion IDH_DOCUMENT_FILEVERSION
AddPictureToList IDH_DOCUMENT_ADDPICTURETOLIST
GetInterfaceInfo IDH_VDRAW_IINFO
version IDH_VDRAW_VERSION
AfterAddEntity IDH_EVENT_AFTERADDENTITY
ShowWCSAxis IDH_VDRAW_WCSAXIS
ExtrusionVector IDH_FIG_EXTRUSION
GetExtrusionVector IDH_UTILITY_GETEXTRUSION
CmdStretch IDH_COMMAND_STRETCH
Height IDH_OBJECT_HEIGHT
PerspectiveMod IDH_DOCUMENT_PRESPECT
FocalLength IDH_DOCUMENT_FOCALLEN
LensAngle IDH_DOCUMENT_LENSANGLE
SetMaterialScale IDH_VDRAW_MATERIALSCALE_SET
GetMaterialScale IDH_VDRAW_MATERIALSCALE_GET
grDraw IDH_UTILITY_GRDRAW
GetCircleRad IDH_UTILITY_GETCIRCLERAD
GetArcEndAngle2 IDH_UTILITY_GETARCANGLE2
IMGSaveSize IDH_VDRAW_WMFSAVESIZE
LinearScaleFactor IDH_DIMSTYLE_LINSCALEFACTOR
DecimalPrecision IDH_DIMSTYLE_DECIMALPRECISION
FrozenLayerList IDH_LAYOUT_FLAYLST
ActiveLayOutEntities IDH_DOCUMENT_ACTIVE_ENTITIES
LayOutControl IDH_COMMAND_LAYOUT_CONTROL
ClipObjHandle IDH_VPORT_CLIP
Center IDH_VPORT_VCEN
ViewCenter IDH_LAYOUT_VCEN
ActiveLayOut IDH_DOCUMENT_ACTIVELAYOUT
LayOuts IDH_DOCUMENT_LAYOUTS
AddViewPort IDH_ENTITYLIST_ADDVIEWPORT
vdLayouts IDH_LAYOUTLIST
vdLayout IDH_LAYOUT
vdViewport IDH_VIEWPORT
ExportPictureToFile IDH_UTILITY_EXPORTPICTURE
DoEvents IDH_VDRAW_DOEVENTS
OSnapSize IDH_VDRAW_OSNAPSIZE
OSnapColor IDH_VDRAW_OSNAPCOLOR
FilletRadiusAtIndex IDH_POLYLINE_FILLETATINDEX
Fillet2ObjectsRadius IDH_UTILITY_FILL2OBJS
SPlineFlag IDH_POLYLINE_SPLFLAG
ProgressBarPercent IDH_EVENT_PROGRESSBARPERCENT
Width IDH_RECT_WIDTH
StyleName IDH_APPLY_STYLENAME
StyleName IDH_STYLENAME
GetBoundExtends IDH_GETBOUNDEXT
Name IDH_NAME
ScaleEntity IDH_FIG_SCALE_ENTITY
SetProgressBarPercent IDH_VDRAW_PROGRESSMETER
CmdXref IDH_COMMAND_XREF
AfterOpenDocument IDH_EVENT_AFTEROPEN
BeforeOpenDocument IDH_EVENT_BEFOREOPEN
CreateControl IDH_EVENT_CREATE
UpdateDlgData IDH_EVENT_UPDDLGDATA
SetEventParamValue IDH_VDRAW_EVENTPARAMVAL
JobLoop IDH_EVENT_JOBLOOP
JobKeyPress IDH_EVENT_JOBKEYPRESS
JobKeyDown IDH_EVENT_JOBKEYDOWN
JobMouseDown IDH_EVENT_JOBMOUSEDOWN
GetPrinterInfo IDH_PRINT_INFO
PixelSize IDH_DOCUMENT_PIXSIZE
AddPolyHatch IDH_ENTITYLIST_ADDPOLYHATCH
CombineList IDH_VDPOLYHATCH_COMBINELIST
EraseAll IDH_VDPOLYHATCH_ERASEALL
AddPolyPath IDH_VDPOLYHATCH_ADDPOLYPATH
vdPolyhatch IDH_VDPOLYHATCH
CreateFromMemory IDH_DOCUMENT_CREATEFROMMEMORY
SaveToMemory IDH_DOCUMENT_SAVEMEMORY
VDDragOver IDH_EVENT_DRAGOVER
VDDragDrop IDH_EVENT_DRAGDROP
PrintAsAPIWhenPossible IDH_PRINT_ASAPI
ScrollView IDH_EVENT_SCROLL
getOsnapPoint IDH_UTILITY_OSNAPPOINT
EraseEntity IDH_EVENT_ERASEENTITY
AddEntity IDH_EVENT_ADDENTITY
StartSelectAtWindow IDH_SELSET_STARTSELECTWINDOW
Spotcutoff IDH_LIGHT_SPOTCUTOFF
Spotexponent IDH_LIGHT_SPOTEXPON
Spotdirection IDH_LIGHT_SPOTDIR
Specular IDH_LIGHT_SPECULAR
Diffuse IDH_LIGHT_DIFFUSE
Ambient IDH_LIGHT_AMBIENT
Position IDH_LIGHT_POSITION
EnableLight IDH_LIGHT_ENABLE
Lights IDH_DOCUMENT_LIGHTS
Default IDH_LIGHTS_DEFAULT
vdLights IDH_LIGHTS
vdLight IDH_LIGHT
CmdRect IDH_COMMAND_RECT
CmdEllipse IDH_COMMAND_ELLIPSE
OpenURL IDH_EVENT_OPENURL
OpenLoops IDH_COMMAND_LOOPS
Zscale IDH_INSERT_ZSCALE
Lock IDH_LAYER_LOCK
NoFileFind IDH_EVENT_NOFINDFILE
ReadyStateChange IDH_EVENT_RSTATECHANGE
KeyUp IDH_EVENT_KEYUP
KeyPress IDH_EVENT_KEYPRESS
KeyDown IDH_EVENT_KEYDOWN
MouseUp IDH_EVENT_MOUSEUP
DblClick IDH_EVENT_DBLCLICK
MouseMove IDH_EVENT_MOUSEMOVE
MouseDown IDH_EVENT_MOUSEDOWN
vdReadyState IDH_VDRAW_READYSTATE
View3D IDH_COMMAND_V3D
Margins IDH_PRINT_MARGINS
PrinterDeviceDefaults IDH_PRINT_PRINTDEVICEDEFAULTS
PrinterSetup IDH_PRINT_PRINTSETUP
Orientation IDH_PRINT_ORIENTATION
SetModifiedFlag IDH_DOCUMENT_SETMODIFY
BeforeModify IDH_EVENT_BMODIFY
AfterModify IDH_EVENT_AMODIFY
CmdRotate3d IDH_COMMAND_ROTATE3D
Cmd3dFace IDH_COMMAND_3DFACE
CmdSphere IDH_COMMAND_SPHERE
CmdPlineToMesh IDH_COMMAND_PLMESH
Cmd3DMesh IDH_COMMAND_3DMESH
CmdCone IDH_COMMAND_CONE
CmdBox3d IDH_COMMAND_BOX3D
SegmentIndexFromPoint IDH_POLYLINE_SEGFROMPOI
OffsetPoints IDH_UTILITY_OFFPOINTS
PointOnLine IDH_UTILITY_POINTONLINE
LayerEntity IDH_FIG_LAYENT
AddDimRadial IDH_ENTITYLIST_ADDDIMRADIAL
AddDimDiameter IDH_ENTITYLIST_ADDDIMDIAM
geomAreaFromPoints IDH_UTILITY_GEOAREA
geomMeasure IDH_UTILITY_GEOMEASURE
geomDivide IDH_UTILITY_GEODIVIDE
geomAngle IDH_UTILITY_GEOANGLE
geomDistance IDH_UTILITY_GEODIST
geomPolar IDH_UTILITY_GEOPOLAR
geomInters IDH_UTILITY_GEOINTERS
GetReal IDH_UTILITY_GETREAL
GetInt IDH_UTILITY_GETINT
GetString IDH_UTILITY_GETSTRING
RemoveVertex IDH_POLYLINE_DELVERT
InsertVertex IDH_POLYLINE_INSVERT
CmdArrayPolar IDH_COMMAND_ARRAYPOLAR
CmdArrayRectangular IDH_COMMAND_ARRAYRECT
CmdMirror IDH_COMMAND_MIRROR
Purge IDH_DOCUMENT_PURGE
CCSToWorld IDH_UTILITY_CCSTOWORLD
WorldToCCS IDH_UTILITY_WORLDTOCCS
LookAt IDH_COMMAND_LOOKAT
UCSWorld IDH_COMMAND_UCSWORLD
UCS IDH_COMMAND_UCS
CmdPoint IDH_COMMAND_POINT
FilterFigure IDH_EVENT_FILTERFIG
MouseWheel IDH_EVENT_MOUSEWHEEL
SizeWindow IDH_EVENT_SIZEWINDOW
DrawBackground IDH_EVENT_DRAWBKGND
AttachMaterial IDH_VDRAW_ATTATCHMATERIAL
DetachMaterial IDH_VDRAW_DETATCHMATERIAL
RenderToDC IDH_DOCUMENT_RENDERTODC
EnableURLs IDH_VDRAW_URL
EnableToolTips IDH_VDRAW_TOOLTIPS
ToolTip IDH_FIG_TOOLTIP
URL IDH_FIG_URL
FilletRadius IDH_POLYLINE_FILLET
Length IDH_FIG_LENGTH
Area IDH_FIG_AREA
Visibility IDH_3DFACE_VISIBILITY
FaceList IDH_PFACE_FACELST
VertexList IDH_3DFACE_VERTICIES
SetInvisibleEdge IDH_3DFACE_VEDGE
AddPolyFace IDH_ENTITYLIST_ADDPFACE
Add3DFace IDH_ENTITYLIST_ADD3DFACE
showEdge IDH_DOCUMENT_SHOWEDGE
View3DMode IDH_DOCUMENT_3DMODE
TargetPoint IDH_DOCUMENT_TARGPOINT
Axis3DRotations IDH_DOCUMENT_3DROT
RenderToBitmap IDH_DOCUMENT_RENDERTOBMP
Get3dEntityFromPOINT IDH_DOCUMENT_3DENTFROMPT
vdPolyface IDH_VDPOLYFACE
vd3DFace IDH_VD3DFACE
Thickness IDH_FIG_THICK
CoordMode IDH_UTILITY_COORDMODE
ChangeCoord IDH_EVENT_CHANGECOORD
DocumentName IDH_PRINT_DOCUMENTNAME
ActivePenStyle IDH_DOCUMENT_ACTIVEPENSTYLE
CurveResolution IDH_VDRAW_CURVRES
PenCaps IDH_VDRAW_PENCAPS
XrefReLoad IDH_BLOCK_XREFRELOAD
XrefLayerControl IDH_BLOCK_XREFLAYER
XrefLayers IDH_BLOCK_XREFLAYERS
XrefFlag IDH_FIG_XREFFLAG
XrefPath IDH_BLOCK_XREFPATH
AddPoint IDH_ENTITYLIST_ADDPOINT
vdPoint IDH_VDPOINT
PtMode IDH_DOCUMENT_PTMODE
PtSize IDH_DOCUMENT_PTSIZE
Handle IDH_FIG_HANDLE
GetFromHandle IDH_DOCUMENT_FROMHANDLE
ActionValidates IDH_VDRAW_VALIDATES
AddXProperty IDH_XPROPERTYLIST_ADDITEM
vdXProperties IDH_XPROPERTYLIST
Value IDH_XPROPERTY_VALUE
Type IDH_XPROPERTY_TYPE
vdXProperty IDH_XPROPERTY
VdViewToPixel IDH_VDRAW_VDVIEWTOPIX
IsValidVDObject IDH_VDRAW_VALIDOBJECT
Utility IDH_VDRAW_UTILITY
UndoMode IDH_VDRAW_UNDOMODE
StatusBar IDH_VDRAW_STATUSBAR
StatusBarOptionSnap IDH_VDRAW_STATBARSNAP
StatusBarOptionOsnap IDH_VDRAW_STATBAROSNAP
StatusBarOptionOrtho IDH_VDRAW_STATBARORTHO
StatusBarOptionGrid IDH_VDRAW_STATBARGRID
SizeToContent IDH_VDRAW_SIZECONECT
ScrollBar IDH_VDRAW_SCROLBAR
DwgSaveVer IDH_VDRAW_SAVEVER
RGBToVdColorIndex IDH_VDRAW_RGBTOVDVIEW
VdrawRes IDH_VDRAW_RESOURCES
ResetScrollPosition IDH_VDRAW_RESETSCROL
Redraw IDH_VDRAW_REDRAW
PropFileName IDH_VDRAW_PROPFILENAME
Prompt IDH_VDRAW_PROMPT
PostCommandString IDH_VDRAW_POSTCMDSTRING
PixelToVdView IDH_VDRAW_PIXTOVDVIEW
PickSize IDH_VDRAW_PICKSIZE
MousePointer IDH_VDRAW_MOUSEPOINTER
MouseIcon IDH_VDRAW_MOUSEICON
LicVAL IDH_VDRAW_LICVAL
hWndView IDH_VDRAW_HWNDVIEW
hDCView IDH_VDRAW_HDCVIEW
GripSize IDH_VDRAW_GRIPSIZE
GripColor IDH_VDRAW_GRIPCOLOR
EnableProgressBar IDH_VDRAW_ENBLPROGRESSBAR
DwgCodePage IDH_VDRAW_DWGCODEPAGE
DrawEntity IDH_VDRAW_DRAWENTITY_METHOD
CrossSize IDH_VDRAW_CROSSIZE
CreateNewVdFigure IDH_VDRAW_CREATENEWFIG
CommandAction IDH_VDRAW_COMMANDACTION
VdColorIndexToRGB IDH_VDRAW_COLINTEXTORGB
AltTTFFont IDH_VDRAW_ALTTTF
ActiveDocument IDH_VDRAW_ACTIVEDOCUMENT
GetPoint IDH_UTILITY_GETPOINT
GetOpenFileName IDH_UTILITY_GETOPENFNAME
GetLine IDH_UTILITY_GETLINE
GetFilePicture IDH_UTILITY_GETFILEPICTURE
GetEntity IDH_UTILITY_GETENTITY
GetDist IDH_UTILITY_GETDIST
GetCorner IDH_UTILITY_GETCORNER
GetColorDlg IDH_UTILITY_GETCOLOR
GetArcEndAngle IDH_UTILITY_GETARCANGLE
GetAngle IDH_UTILITY_GETANGLE
vdUtility IDH_UTILITY
vdTextstyles IDH_TEXTSTYLELIST
FontFile IDH_TEXTSTYLE_FONTFILE
Extra IDH_TEXTSTYLE_EXTRA
vdTextstyle IDH_TEXTSTYLE
VerJustify IDH_TEXT_VERJUST
TextString IDH_TEXT_TEXTSTRING
HorJustify IDH_TEXT_HORJUST
GetTextBox IDH_TEXT_GETTEXTBOX
vdText IDH_TEXT
FreeAll IDH_SELSETLIST_FREEALL
vdSelections IDH_SELSETLIST
Select IDH_SELSET_SELECT
SelectAtPoint IDH_SELSET_SELATPOINT
RemoveAll IDH_SELSET_REMOVEALL
HighLight IDH_SELSET_HIGHLIGHT
Free IDH_SELSET_FREE
ClearAll IDH_SELSET_CLEARALL
vdSelection IDH_SELSET
vdRect IDH_RECT
PrintScaleToFit IDH_PRINT_SCALETOFIT
PrintWindow IDH_PRINT_PRINTWIN
PrintScale IDH_PRINT_PRINTSCALE
PrintOut IDH_PRINT_PRINTOUT
PrintExtends IDH_PRINT_PRINTEXTENDS
PrinterDC IDH_PRINT_PRINTERDC
Preview IDH_PRINT_PREVIEW
PenWidth IDH_PRINT_PENWIDTH
OutInBlackWhite IDH_PRINT_OUTINBLKWHITE
AttachPreview IDH_PRINT_ATTATCHPREVIEW
vdPrint IDH_PRINT
VertexList IDH_POLYLINE_VERTEXLIST
SetVertexAt IDH_POLYLINE_SETVERTAT
SetBulge IDH_POLYLINE_SETBULGE
GetNumVerticies IDH_POLYLINE_NUMVERTS
GetVertexAt IDH_POLYLINE_GETVERTAT
GetBulge IDH_POLYLINE_GETBULGE
Explode IDH_POLYLINE_EXPLODE
AppendVertex IDH_POLYLINE_APPENDVERT
vdPolyline IDH_POLYLINE
StartPoint IDH_LINE_STARTPOINT
EndPoint IDH_LINE_ENDPOINT
vdLine IDH_LINE
vdLayers IDH_LAYERLIST
Frozen IDH_LAYER_FROZEN
vdLayer IDH_LAYER
Yscale IDH_INSERT_YSCALE
Xscale IDH_INSERT_XSCALE
SetAttribValue IDH_INSERT_SETATTRIBVAL
Rotation IDH_INSERT_ROTATION
InsertionPoint IDH_INSERT_INSPOINT
GetNumOfAttributes IDH_INSERT_GETNUMATTR
GetAttribTagItem IDH_INSERT_GETATTRTAGITEM
BlockName IDH_INSERT_BLOCKNAME
GetAttribValue IDH_INSERT_ATTRIBVALUE
vdInsert IDH_INSERT
ImageScale IDH_IMAGE_SCALE
ImageFileName IDH_IMAGE_FILENAME
Display IDH_IMAGE_DISPLAY
vdImage IDH_IMAGE
vdFigure IDH_FIGURE
XProperties IDH_FIG_XPROPERTIES
VisibleOnScreen IDH_FIG_VISONSCREEN
Visible IDH_FIG_VISIBLE
Update IDH_FIG_UPDATE
Type IDH_FIG_TYPE
ShowGrips IDH_FIG_SHOWGRIPS
Scale IDH_FIG_SCALE
Rotate IDH_FIG_ROTATE
PenWidth IDH_FIG_PENWIDTH
PenStyle IDH_FIG_PENSTYLE
PenColor IDH_FIG_PENCOLOR
MoveGripPointsAt IDH_FIG_MOVEGRIPSAT
Move IDH_FIG_MOVE
LayerName IDH_FIG_LAYERNAME
Label IDH_FIG_LABEL
Invalidate IDH_FIG_INVALIDATE
IntersectWith IDH_FIG_INTERSECTWITH
ID IDH_FIG_ID
HighLight IDH_FIG_HIGHLIGHT
Grips IDH_FIG_GRIPS
GetBoundingBox IDH_FIG_GETBOUNDBOX
Erase IDH_FIG_ERASE
DrawGrips IDH_FIG_DRAWGRIPS
Copy IDH_FIG_COPY
LeftMouseButtonDown IDH_EVENT_LBTNDOWN
JobStart IDH_EVENT_JOBSTART
JobPrompt IDH_EVENT_JOBPROMPT
JobError IDH_EVENT_JOBERROR
JobEnd IDH_EVENT_JOBEND
EntityDraw IDH_EVENT_DRAWENTITY
DrawAfterEntity IDH_EVENT_DRAWAFTERENTITY
DrawAfter IDH_EVENT_DRAWAFTER
Draw IDH_EVENT_DRAW
DefaultDimTxt IDH_EVENT_DEFDIMTXT
CoordMouseMove IDH_EVENT_COORDMOUSEMOVE
InsertBlock IDH_ENTITYLIST_INSERTBLOCK
EraseAll IDH_ENTITYLIST_ERASEALL
AddText IDH_ENTITYLIST_ADDTEXT
AddRect IDH_ENTITYLIST_ADDRECT
AddPolyLine IDH_ENTITYLIST_ADDPOLYLINE
AddLine IDH_ENTITYLIST_ADDLINE
AddImage IDH_ENTITYLIST_ADDIMAGE
AddEllipse IDH_ENTITYLIST_ADDELLIPSE
AddDimRotated IDH_ENTITYLIST_ADDDIMROT
AddDimAligned IDH_ENTITYLIST_ADDDIMALI
AddCircle IDH_ENTITYLIST_ADDCIRCLE
AddAttrib IDH_ENTITYLIST_ADDATTRIB
AddArc IDH_ENTITYLIST_ADDARC
vdEntities IDH_ENTITYLIST
MinorLength IDH_ELLIPSE_MINOR
MajorAngle IDH_ELLIPSE_MAJORANG
MajorLength IDH_ELLIPSE_MAJOR
vdEllipse IDH_ELLIPSE
ViewWidth IDH_DOCUMENT_VIEWWIDTH
ViewSize IDH_DOCUMENT_VIEWSIZE
TextStyles IDH_DOCUMENT_TXTSTYLES
SupportPath IDH_DOCUMENT_SUPPORTPATH
SnapMode IDH_DOCUMENT_SNAPMOD
Selections IDH_DOCUMENT_SELSET
SaveAs IDH_DOCUMENT_SAVEAS
Save IDH_DOCUMENT_SAVE
Printer IDH_DOCUMENT_PRINTER
OsnapMode IDH_DOCUMENT_OSNAPMODE
OrthoMode IDH_DOCUMENT_ORTHOMODE
OriginY IDH_DOCUMENT_ORIGINY
OriginX IDH_DOCUMENT_ORIGINX
Open IDH_DOCUMENT_OPEN
New IDH_DOCUMENT_NEW
LineTypeScale IDH_DOCUMENT_LINETYPESCALE
Limits IDH_DOCUMENT_LIMITS
Layers IDH_DOCUMENT_LAYERS
IsModified IDH_DOCUMENT_ISMODIFY
IDCount IDH_DOCUMENT_IDCOUNT
GetGripFromPOINT IDH_DOCUMENT_GRIPFROMPOINT
GridMode IDH_DOCUMENT_GRIDMODE
GetFromID IDH_DOCUMENT_FROMID
FileName IDH_DOCUMENT_FILENAME
Entities IDH_DOCUMENT_ENTITIES
GetEntityFromPOINT IDH_DOCUMENT_ENTFROMPT
DimStyles IDH_DOCUMENT_DIMSTYLES
Blocks IDH_DOCUMENT_BLOCKS
BasePoint IDH_DOCUMENT_BASEPOINT
ActiveTextVerJustify IDH_DOCUMENT_ACTIVETXTVERJUST
ActiveTextStyle IDH_DOCUMENT_ACTIVETXTSTYLE
ActiveTextHorJustify IDH_DOCUMENT_ACTIVETXTHORJUST
ActiveTextHeight IDH_DOCUMENT_ACTIVETXTHEIGHT
ActivePenWidth IDH_DOCUMENT_ACTIVEPENWIDTH
ActiveLayer IDH_DOCUMENT_ACTIVELAYER
ActiveFillMode IDH_DOCUMENT_ACTIVEFILLMOD
ActiveFillColor IDH_DOCUMENT_ACTIVEFILLCOL
ActiveFillBkColor IDH_DOCUMENT_ACTIVEFILLBKCOL
ActiveDimStyle IDH_DOCUMENT_ACTIVEDIMSTYLE
ActiveColor IDH_DOCUMENT_ACTIVECOLOR
vdDocument IDH_DOCUMENT
vdDimstyles IDH_DIMSTYLELIST
TextVerJust IDH_DIMSTYLE_TXTVERJUST
TextHorRotation IDH_DIMSTYLE_TXTHORROT
TextHorJust IDH_DIMSTYLE_TXTHORJUST
TextHeight IDH_DIMSTYLE_TXTHEIGHT
TextDist IDH_DIMSTYLE_TXTDIST
TextColor IDH_DIMSTYLE_TXTCOL
TextStyle IDH_DIMSTYLE_TEXTSTYLE
ScaleFactor IDH_DIMSTYLE_SCALEFACTOR
ExtLineVisible IDH_DIMSTYLE_EXTLINEVISIBLE
ExtLineDist2 IDH_DIMSTYLE_EXTLINEDIS2
ExtLineDist1 IDH_DIMSTYLE_EXTLINEDIS1
ExtLineColor IDH_DIMSTYLE_EXTLINECOL
ArrowSize IDH_DIMSTYLE_ARROWSIZE
ArrowName IDH_DIMSTYLE_ARROWNAME
vdDimstyle IDH_DIMSTYLE
dimType IDH_DIMENSION_TYPE
TextPosition IDH_DIMENSION_TXTPOS
dimText IDH_DIMENSION_TEXT
Rotation IDH_DIMENSION_ROTATION
LinePosition IDH_DIMENSION_LINEPOS
DimLength IDH_DIMENSION_LENGTH
DefPoint2 IDH_DIMENSION_DEFPT2
DefPoint1 IDH_DIMENSION_DEFPT1
vdDimension IDH_DIMENSION
Zoom IDH_COMMAND_ZOOM
CmdWriteBlock IDH_COMMAND_WBLOCK
Undo IDH_COMMAND_UNDO
CmdTrim IDH_COMMAND_TRIM
CmdTextStyle IDH_COMMAND_TEXTSTYLE
CmdText IDH_COMMAND_TEXT
CmdSelect IDH_COMMAND_SELECT
CmdScale IDH_COMMAND_SCALE
CmdRotate IDH_COMMAND_ROTATE
RegenAll IDH_COMMAND_REGEN
Redo IDH_COMMAND_REDO
CmdPrintDialog IDH_COMMAND_PRINTDLG
CmdPolyLine IDH_COMMAND_PLINE
Pan IDH_COMMAND_PAN
CmdOffset IDH_COMMAND_OFFSET
CmdMove IDH_COMMAND_MOVE
CmdMakeBlock IDH_COMMAND_MBLOCK
CmdLine IDH_COMMAND_LINE
LayerControl IDH_COMMAND_LAYER
CmdInsert IDH_COMMAND_INSERT
CmdInsertBlockDialog IDH_COMMAND_INSBLOCKDLG
CmdImage IDH_COMMAND_IMAGE
vdCommand IDH_COMMAND_GENERALCMD
CmdFillet IDH_COMMAND_FILLET
CmdExtend IDH_COMMAND_EXTEND
CmdExplode IDH_COMMAND_EXPLODE
CmdErase IDH_COMMAND_ERASE
EditAttrib IDH_COMMAND_EDITATTRIB
CmdDim IDH_COMMAND_DIM
CmdCopy IDH_COMMAND_COPY
CmdClipPaste IDH_COMMAND_CLIPPASTE
CmdClipCut IDH_COMMAND_CLIPCUT
CmdClipCopy IDH_COMMAND_CLIPCOPY
CmdCircle IDH_COMMAND_CIRCLE
Cancel IDH_COMMAND_CANCEL
CmdBreak IDH_COMMAND_BREAK
CmdArc IDH_COMMAND_ARC
vdCommand IDH_COMMAND
RemoveItem IDH_COLLECT_REMOVEITEM
Item IDH_COLLECT_ITEM
FindName IDH_COLLECT_FINDNAME
Count IDH_COLLECT_COUNT
ChangeOrder IDH_COLLECT_CHANGEORDER
AddItem IDH_COLLECT_ADDITEM
AddFromFile IDH_COLLECT_ADDFROMFILE
Add IDH_COLLECT_ADD
Radius IDH_CIRCLE_RADIUS
CenterPoint IDH_CIRCLE_CENTER
vdCircle IDH_CIRCLE
vdBlocks IDH_BLOCKLIST
origin IDH_BLOCK_ORIGIN
vdBlock IDH_BLOCK
ValueString IDH_ATTRIB_VALSTR
TagString IDH_ATTRIB_TAGSTR
PromptString IDH_ATTRIB_PROMPTSTR
InVisibleMode IDH_ATTRIB_INVISMOD
vdAttrib IDH_ATTRIB
StartAngle IDH_ARC_STARTANGLE
hatchScale IDH_ARC_HATCHSCALE
hatchBlock IDH_ARC_HATCHBLK
FillMode IDH_ARC_FILLMODE
FillColor IDH_ARC_FILLCOL
FillBkColor IDH_ARC_FILLBKCOL
EndAngle IDH_ARC_ENDANGLE
vdArc IDH_ARC
Phần 2: Class Model
I. vdFilterObjectMiêu tả:
Thuộc đối tượng VectorDraw Filter
Lưu ý:
Đối tượng này được sử dụng cho việc lọc các đối tượng trong cơ sở dữ liệu gồm các
thực thể được vẽ vì vậy những đối tượng này có thể được thêm vào tập hợp đã được
chọn. Xem trong vdSelection, vdSelections, CreateFilter, FilterSelect và CreateInstance.
Ví dụ
Thêm 2 lớp đối tượng vào một tập hợp các lớp. Thêm một kiểu chữ mới vào tập hợp các
kiểu chữ, và gán kiểu chữ cho lớp từ "0" thành "STANDARD". Thêm một dòng, một
đoạn văn bản, một hình cung, và một hình tròn vào trong tập hợp các thực thể. Gán kiểu
chữ từ "WALLS" thành "TEXTSTYLE1" cho tất cả các lớp và thay đổi màu của nó.
Thêm vào một lần nữa các đối tượng hình học có vị trí 6 đơn vị về phía bên phải. Thay
đổi màu của lớp "DOORS" và thêm lần thứ 3 các đối tượng hình học 6 điểm về phía bên
phải. Tìm những đối tượng hình học mà thuộc tính layerName có giá trị như đã nêu.
Cuối cùng thay đổi màu của toàn bộ các đối tượng.
Ví dụ tương tự trong Visual Basic 6:
Dim myLayers As Variant
Dim myTypes As Variant
Dim myfig As vdFigure
Dim sel As vdSelection
Dim myfilter As vdFilterObject
With VDPro.ActiveDocument
.ActiveTextHorJustify = VdTextHorCenter
.Layers.Add "WALLS" ' Creation of layers and textstyles
.Layers.Add "DOORS"
.TextStyles.Add "TEXTSTYLE1"
.ActiveLayer = "0" ' Layer "0"
.ActiveTextStyle = "STANDARD"
.Entities.AddLine Array(0, 0, 0), Array(5, 5, 5)
.Entities.AddText "Layer 0", Array(0, 0, 0), 0.4
.Entities.AddArc Array(0, 0, 0), 3, 0, 2
.Entities.AddCircle Array(0, 0, 0), 2
.ActiveLayer = "WALLS" ' Layer "WALLS"
.ActiveTextStyle = "TEXTSTYLE1"
.ActiveColor = 5
.Entities.AddLine Array(6, 1, 1), Array(11, 6, 6)
.Entities.AddText "Layer WALLS", Array(6, 1, 1), 0.4
.Entities.AddArc Array(6, 1, 1), 3, 0, 2
.Entities.AddCircle Array(6, 1, 1), 2
.ActiveLayer = "DOORS" ' Layer "DOORS"
.ActiveColor = 6
.Entities.AddLine Array(12, 2, 2), Array(17, 7, 7)
.Entities.AddText "Layer DOORS", Array(12, 2, 2), 0.4
.Entities.AddArc Array(12, 2, 2), 3, 0, 2
.Entities.AddCircle Array(12, 2, 2), 2
End With
VDPro.CommandAction.Zoom "E", 0, 0
MsgBox "Creation of layers, textstyles, and vdFigures"
myLayers = Array("0", "WALLS") ' Là lớp cần tìm
myTypes = Array("VDLINE", "VDARC", "VDTEXT") ' What types of entities to
search for
Set myfilter = VDPro.ActiveDocument.Selections.CreateFilter(myTypes, myLayers)
myfilter.TextStyles = Array("TEXTSTYLE1") ' I want the texts that have only this
TextStyle
' Filters the database with the above properties and creates a new SelectionSet
' by the name "FILTER1" with the objects that have been asked. If "FILTER1" had
' entities before then this SelectionSet is reseted.
Set sel = VDPro.ActiveDocument.Selections.FilterSelect("FILTER1", myfilter)
sel.ApplyFilter myfilter
For Each myfig In sel
myfig.PenColor = 3 'Get all the entities selected and change their properties
(color)
myfig.Invalidate
Next
MsgBox "The green vdFigures where selected."
Ví dụ trong Visual C++ 6.0:
// Creation of layers and textstyles
m_vdraw.GetActiveDocument().SetActiveTextHorJustify(6);
m_vdraw.GetActiveDocument().GetLayers().Add("WALLS");
m_vdraw.GetActiveDocument().GetLayers().Add("DOORS");
m_vdraw.GetActiveDocument().GetTextStyles().Add("TEXTSTYLE1");
m_vdraw.GetActiveDocument().SetActiveLayer("0");
m_vdraw.GetActiveDocument().SetActiveTextStyle("STANDARD");
m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(0,0,0),COlePoint(5,
5,5));
m_vdraw.GetActiveDocument().GetEntities().AddText("Layer
0",COlePoint(0,0,0),0.4);
m_vdraw.GetActiveDocument().GetEntities().AddArc(COlePoint(0,0,0), 3, 0, 2);
m_vdraw.GetActiveDocument().GetEntities().AddCircle(COlePoint(0,0,0), 2);
m_vdraw.GetActiveDocument().SetActiveLayer("WALLS");
m_vdraw.GetActiveDocument().SetActiveTextStyle("TEXTSTYLE1");
m_vdraw.GetActiveDocument().GetActiveColor().SetColorIndex(6);
m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(6,1,1),COlePoint(11
,6,6));
m_vdraw.GetActiveDocument().GetEntities().AddText("Layer
0",COlePoint(6,1,1),0.4);
m_vdraw.GetActiveDocument().GetEntities().AddArc(COlePoint(6,1,1), 3, 0, 2);
m_vdraw.GetActiveDocument().GetEntities().AddCircle(COlePoint(6,1,1), 2);
m_vdraw.GetActiveDocument().SetActiveLayer("DOORS");
m_vdraw.GetActiveDocument().GetActiveColor().SetColorIndex(5);
m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(12,2,2),COlePoint(1
7,7,7));
m_vdraw.GetActiveDocument().GetEntities().AddText("Layer
0",COlePoint(12,2,2),0.4);
m_vdraw.GetActiveDocument().GetEntities().AddArc(COlePoint(12,2,2), 3, 0, 2);
m_vdraw.GetActiveDocument().GetEntities().AddCircle(COlePoint(12,2,2), 2);
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
AfxMessageBox("Creation of layers, textstyles, and vdFigures");
COleStringArray layersToSearch;
layersToSearch.AddValue("0");
layersToSearch.AddValue("WALLS");
COleStringArray typesToSearch;
typesToSearch.AddValue("VDLINE");
typesToSearch.AddValue("VDARC");
typesToSearch.AddValue("VDTEXT");
CvdFilterObject
myFilter=m_vdraw.GetActiveDocument().GetSelections().CreateFilter(typesToSearch,l
ayersToSearch);
myFilter.SetTextStyles(COleString("TEXTSTYLE1"));// I want the texts that have only
this TextStyle
/*
Filters the database with the above properties and creates a new SelectionSet
by the name "FILTER1" with the objects that have been asked. If "FILTER1" had
entities before then this SelectionSet is reseted.
*/
CvdSelection
sel=m_vdraw.GetActiveDocument().GetSelections().FilterSelect("FILTER1",myFilter);
sel.ApplyFilter(myFilter);
int i;
for(i=0;i<sel.GetCount();i++){
sel.GetItem(i).GetPenColor().SetColorIndex(3);//Get all the entities selected
and change their properties (color)
sel.GetItem(i).Invalidate();
}
AfxMessageBox("The green vdFigures where selected.");
II. vdObjectUUID
{CACEC91E-6AC7-443F-A706-C17021E3D139}
Miêu tả
Là đối tượng VectorDraw
Danh sách các thành viên trong module này tham khảo trong vdObject members.
III. PrimaryUUID
{034A3C42-5E97-49AD-96D3-05966C43B65B}
Miêu tả
Là đối tượng VectorDraw Primitive
Danh sách các thành viên trong module này tham khảo trong vdPrimary members.
Lưu ý
vdPrimary là một đối tượng cơ bản mà từ nó, các đối tượng sau được kế thừa:
vdFigure
vdLayer
vdBlock
vdTextstyle
vdDimstyle
vdLayout
Tất cả các đối tượng trên thừa kế tất cả các thuộc tính và phương thức của vdPrimary
Ví dụ
Xem vdPrimary_members trong V.B. 6.0
IV. vdFigureUUID
{0C69DCEA-9F7C-4C93-BBC7-81F275AF82DF}
Miêu tả
Là đối tượng chung của VectorDraw
Danh sách các thành viên trong module này tham khảo trong vdFigure members.
Cấp bậc thừa kế
vdPrimary
Lưu ý
Đây là đối tượng vẽ cơ bản. Tất cả các thực thể vẽ khác đều thừa kế từ đối tượng này.
Nó được sử dụng chính trong một hàm hoặc các sự kiện mà tham số có thể tạo bởi bất
kì một đối tượng nào trong tập hợp
Xem trong Model Class
Bạn có thể sử dụng thuộc tính Type để xem kiểu của đối tượng và thay đổi chữ
Có thể xem trong
vdFigure members | Base Class
1. vdPolyface
UUID
{5E4577D6-14E6-4037-A8AB-91729B4D742C}
Miêu tả
Là đối tượng của VectorDraw PolyFace
Danh sách các thành viên trong module này tham khảo trong vdPolyface members.
Cấp bậc thừa kế
vdPrimary
vdFigure
Miêu tả
Bạn xác định một đa diện bằng cách xác định mỗi đỉnh chóp và gắn các đỉnh chóp lại
với nhau thành một giao diện trong một mạng lưới.
Bạn có thể tạo bằng đối tượng 3D
Để vẽ đa diện một cách đơn giản, gọi hàm AddPolyFace
Xem trong các hàm:
Cmd3DMesh
CmdBox3D
CmdCone
CmdPLineToMesh
CmdSphere
Ví dụ
Tạo một đa diện dựa trên các mặt xác định. Đầu ra là một hình khối
Ví dụ bằng Visual Basic 6:
'Draw a Box 1x1x1
DIM pface As VDPOLYFACE
Dim facelist As Variant
'construct a facelist for 6 sides of box.
'the color of faces is ByLayer = 0
facelist = Array(1, 2, 3, 4, 0, _
5, 6, 7, 8, 0, _
1, 5, 6, 2, 0, _
2, 6, 7, 3, 0, _
3, 7, 8, 4, 0, _
4, 8, 5, 1, 0)
Set pface = VDPro.ActiveDocument.Entities.AddPolyFace(Array(Array(0, 0, 0), _
Array(1, 0, 0), _
Array(1, 1, 0), _
Array(0, 1, 0), _
Array(0, 0, 1), _
Array(1, 0, 1), _
Array(1, 1, 1), _
Array(0, 1, 1) _
), _
facelist)
VDPro.CommandAction.View3D "VISW"
VDPro.CommandAction.Zoom "E", 0, 0
to have the vertical edges invisible set facelist as follow:
facelist = Array(1, 2, 3, 4, 0, _
5, 6, 7, 8, 0, _
-1, 5, -6, 2, 0, _
-2, 6, -7, 3, 0, _
-3, 7, -8, 4, 0, _
-4, 8, -5, 1, 0)
Sample code in Visual C++ 6.0:
//Draw a Box 1x1x1
/*
construct a facelist for 6 sides of box.
the color of faces is ByLayer = 0
*/
int faceListData[]={1,2,3,4,0 ,5,6,7,8,0 ,1,5,6,2,0 ,2,6,7,3,0, 3,7,8,4,0,
4,8,5,1,0};
//the same face list with the vertical edges invisible
//int faceListData[]={1,2,3,4,0 ,5,6,7,8,0 ,-1,5,-6,2,0 ,-2,6,-7,3,0, -3,7,-8,4,0, -
4,8,-5,1,0};
int i;
COleIntArray faceList;
for(i=0;i<sizeof(faceListData)/sizeof(int);i++){
faceList.AddValue(faceListData[i]);
}
COlePointArray vertexList;
vertexList.Add(COlePoint(0,0,0));
vertexList.Add(COlePoint(1,0,0));
vertexList.Add(COlePoint(1,1,0));
vertexList.Add(COlePoint(0,1,0));
vertexList.Add(COlePoint(0,0,1));
vertexList.Add(COlePoint(1,0,1));
vertexList.Add(COlePoint(1,1,1));
vertexList.Add(COlePoint(0,1,1));
CvdPolyface
pFace=m_vdraw.GetActiveDocument().GetEntities().AddPolyFace(vertexList,faceList)
;
m_vdraw.GetCommandAction().View3D(COleString("VISW"));
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
Tương tự xem trong:
vdPolyface members | Base Class
2. vdLine
UUID
{C03825F8-8DA6-4397-9071-B86D1A978D3D}
Description
Là một đối tượng của VectorDraw Line
Danh sách các thành viên trong module này tham khảo trong vdLine members.
Cấu trúc thừa kế
vdPrimary
vdFigure
Lưu ý
Là một đoạn dòng đơn
Các dòng có thể là một đoạn hoặc nhiều đoạn nối với nhau, nhưng mỗi đoạn là một
dòng riêng biệt.
Sử dụng dòng nếu bàn muốn sửa lại các đoạn riêng biệt.
Dòng được xác định bởi hai điểm, điểm đầu và điểm cuối.
Khi dòng có độ dày thì vector mở rộng của dòng sẽ xác định hướng của độ dày
Để vẽ một dòng, đơn giản gọi hàm AddLine
Nếu bạn muốn vẽ một loạt các đoạn như những đối tượng riêng lẻ, sử dụng Polyline
object.
Ví dụ
Ví dụ bằng Visual Basic 6:
Dim myline As vdLine
Set myline = VDPro.ActiveDocument.Entities.AddLine(Array(0#, 0#, 0#), Array(5#,
5#, 0#))
myline.Invalidate 'Use Invalidate to see the line
Ví dụ bằng Visual C++ 6.0:
CvdLine
myLine=m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(0,0,0),COl
ePoint(5,5,0));
myLine.Invalidate();
Tương tự trong:
vdLine members | Base Class
3. vdPolyline
UUID
{B94E1313-1B33-410C-B4A5-E1D43352FD72}
Miêu tả
Thuộc đối tượng VectorDraw PolyLine
Xem các thành viên trong vdPolyline members.
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Đối tượng này là một dòng 2D/3D bao gồm các đoạn và hình cung (chỗ lồi ra).
Đa nét được xác định bở một dãy các đỉnh (điểm trong World CS)
Khi đa nét có nét đậm thì véc tơ phồng ra của đa nét sẽ xác định hướng của nét đậm
Đa nét có thể được mở hoặc đóng (xem thuộc tính Flag của nó), có thể SPLine (xem
thuộc tính SPlineFlag của Polyline) và có thể được đổ bằng màu hoặc nét chải.
Để vẽ một đa nét, gọi hàm AddPolyLine .
Ví dụ
Vẽ một đa nét và với mỗi đoạn vòng cung có 3 đường:
Đường đầu tiên từ trung tâm của vòng cung đến điểm đầu của vòng cung
Đường thứ hai từ trung tâm của vòng cung đến điểm cuối của vòng cung
Đường thứ ba từ trung tâm của vòng cung này đến trung tâm của vòng cung kia.
Ví dụ trong Visual Basic 6:
Dim PolyT As vdPolyline
Dim LineT As vdLine
Dim P1 As Variant 'The first Point of the arc in the polyline
Dim P2 As Variant 'The second Point of the arc in the polyline
Dim TempX As Variant 'General purpose
Dim Angle_P1_P2 As Double
Dim Mid As Variant 'MidPoint of Chord
Dim MidArc As Variant 'MidPoint of arc
Dim Cent As Variant 'CenterPoint of Arc
Dim Bulge As Double 'The included arc
Dim IncludAngle As Double 'The included arc
Dim ChordLength As Double 'The Chord length
Dim Altitude As Double 'The arc altitude
Dim Radius As Double 'The arc Radius
Dim I As Integer
Dim pi As Double
pi = 3.141592654
Dim Pline As vdPolyline
Set Pline = VDPro.ActiveDocument.Entities.AddPolyLine(Array(Array(0, 0, 0),
Array(5, 0, 0), Array(7, 5, 0), Array(10, 5, 0)))
Pline.Invalidate
Pline.BulgeList = Array(0.3, 0, 0.1)
Set PolyT = Pline
TempX = PolyT.VertexList
For I = 0 To PolyT.GetNumVerticies - 2
Bulge = PolyT.GetBulge(I)
If Bulge <> 0 Then ' If there is an erc
P1 = Array(TempX(I, 0), TempX(I, 1), TempX(I, 2)) 'Got the first Arc-Point
P2 = Array(TempX(I + 1, 0), TempX(I + 1, 1), TempX(I + 1, 2)) 'Got the second
Arc-Point
IncludAngle = Atn(Bulge) * 4#
ChordLength = Sqr(((P2(0) - P1(0)) * (P2(0) - P1(0))) + ((P2(1) - P1(1)) *
(P2(1) - P1(1))))
Altitude = (Bulge * ChordLength) / 2
Radius = (((ChordLength / 2#) * (ChordLength / 2#)) + (Altitude * Altitude)) /
(2# * Altitude)
Angle_P1_P2 = VDPro.Utility.geomAngle(P1, P2)
Mid = Array((P1(0) + P2(0)) / 2#, (P1(1) + P2(1)) / 2#, (P1(2) + P2(2)) / 2#)
Cent = VDPro.Utility.geomPolar(P1, (Angle_P1_P2 + ((pi - IncludAngle) / 2#)),
(Radius))
Angle_P1_P2 = VDPro.Utility.geomAngle(Cent, Mid)
If Abs(Radius) > Abs(Altitude) Then
MidArc = VDPro.Utility.geomPolar(Cent, Angle_P1_P2, Abs(Radius))
Else
MidArc = VDPro.Utility.geomPolar(Cent, pi + Angle_P1_P2, Abs(Radius))
End If
Set LineT = VDPro.ActiveDocument.Entities.AddLine(Cent, P1)
LineT.Update
LineT.Invalidate
LineT.PenColor = I + 2
Set LineT = VDPro.ActiveDocument.Entities.AddLine(Cent, P2)
LineT.Invalidate
LineT.PenColor = I + 2
LineT.Update
Set LineT = VDPro.ActiveDocument.Entities.AddLine(Cent, MidArc)
LineT.PenColor = I + 2
LineT.PenWidth = 0.5
LineT.Update
LineT.Invalidate
End If 'Bulge <>0
Next I
Set LineT = Nothing
Set PolyT = Nothing
VDPro.CommandAction.Zoom "E", "", ""
Ví dụ bằng Visual C++ 6.0:
CvdPolyline PolyT;
CvdLine line;
double angleP1P2;
double bulge ,includAngle,chordLength,altitude,radius;
int i;
double pi = 3.141592654;
COlePoint p1;
COlePoint p2;
COlePoint mid;
COlePoint midArc;
COlePoint center;
COlePointArray pArray;
pArray.Add(COlePoint(0, 0, 0));
pArray.Add(COlePoint(5, 0, 0));
pArray.Add(COlePoint(7, 5, 0));
pArray.Add(COlePoint(10, 5, 0));
CvdPolyline
pLine=m_vdraw.GetActiveDocument().GetEntities().AddPolyLine(pArray);
COleDoubleArray dArray;
dArray.AddValue(0.3);
dArray.AddValue(0.0);
dArray.AddValue(0.1);
pLine.SetBulgeList(dArray);
PolyT=pLine;
COlePointArray parray=PolyT.GetVertexList();
parray=PolyT.GetVertexList();
for(i=0;i fabs(altitude)){
midArc=m_vdraw.GetUtility().geomPolar(center,angleP1P2,fabs(radius));
}
else{
midArc=m_vdraw.GetUtility().geomPolar(center,pi+angleP1P2,fabs(radius));
}
line =
m_vdraw.GetActiveDocument().GetEntities().AddLine(center,//get the point
VARIANT type value , //pass it in
vdraw method p1 //same as previous
point...
);
line.GetPenColor().SetColorIndex(i+2);
line =
m_vdraw.GetActiveDocument().GetEntities().AddLine(center,//get the point
VARIANT type value ,
//pass it in vdraw method
//and attach
it in to a COleVariant class
p2 //same as previous point...
line.GetPenColor().SetColorIndex(i+2);
line =
m_vdraw.GetActiveDocument().GetEntities().AddLine(center,//get the point
VARIANT type value ,
//pass it in vdraw method
//and attach it in to a COleVariant class
//to automaticaly clear the memory from VARIANT
//after method finish
midArc //same as previous point...
line.SetPenWidth(0.5);
line.GetPenColor().SetColorIndex(i+2);
}
}//for polyline
4. vdArc
UUID
{EB2A6A71-49B3-445E-BC78-004EC5251937}
Miêu tả
Thuộc đối tượng VectorDraw Arc
Xem các thành viên trong vdArc members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Là một cung tròn
Một vòng cung luôn được vẽ ngược chiều kim đồng hồ từ Góc đầu đến góc cuối.
Các thuộc tính của điểm đầu và điểm cuối của một vòng cung được tính thông qua các
thuộc tính của Góc đầu, góc cuối và bán kính.
Vòng cung được vẽ trong một mặt phẳng được xác định bởi Điểm giữa và vecto mở
rộng (ExtrusionVector)
Để vẽ hình vòng cung, đơn giản gọi hàm AddArc
Ví dụ
Vẽ một hình vòng cung
Ví dụ trong Visual Basic 6:
Dim myArc As vdArc
Dim p As Double
p = 3.141592654
Set myArc = VDPro.ActiveDocument.Entities.AddArc(Array(0#, -2#, 0#), 5#, 0#, p /
2)
myArc.Invalidate 'Use invalidate to see the arc
Ví dụ trong Visual C++ 6.0:
double pi=3.141592654;
CvdArc myarc=m_vdraw.GetActiveDocument().GetEntities().AddArc(COlePoint(0,-
2,0),5,0,pi/2);
myarc.Invalidate();
Xem tương tự trong
vdArc members | Base Class
5. vdCircle
UUID
{7190979C-830E-4B6B-9870-95324990DE71}
Miêu tả
Thuộc đối tượng VectorDraw Circle
Xem các thành viên trong vd Circle members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Áp dụng với một vòng tròn đầy.
Vòng tròn được vẽ trong một mặt phẳng được xác định bởi Điểm tâm và vecto mở rộng
(ExtrusionVector)
Để vẽ hình tròn, đơn giản gọi hàm Ad dCircle
Ví dụ
Vẽ một hình tròn
Ví dụ trong Visual Basic 6:
Dim mycircle As vdCircle
Set mycircle = VDPro.ActiveDocument.Entities.AddCircle(Array(1#, 0#, 0#), 2#)
mycircle.Invalidate
Ví dụ trong Visual C++ 6.0:
CvdCircle
myCircle=m_vdraw.GetActiveDocument().GetEntities().AddCircle(COlePoint(1,0,0),2)
;
myCircle.Invalidate();
Xem tương tự trong
vdArc members | Base Class
6. vdEllipse
UUID
{9B35E41A-531D-47A1-B5C4-9EAA86152249}
Miêu tả
Thuộc đối tượng VectorDraw Ellipse
Xem các thành viên trong vd Ellipse members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Áp dụng cho vòng ellipse hoặc cung ellipse.
Một ellipse hoặc cung ellipse luôn được vẽ ngược chiều kim đồng hồ từ Góc đầu đến
góc cuối.
Một ellipse được xác định bởi góc và trục lớn và độ dài xác định bởi góc lớn, điểm tâm,
góc bắt đầu và góc cuối.
Ellipse hoặc cung ellipse được vẽ trong một mặt phẳng được xác định bởi Điểm tâm và
vecto mở rộng (ExtrusionVector)
Để vẽ hình ellipse, đơn giản gọi hàm Ad dEllipse
Ví dụ
Vẽ một elippse vào một tập hợp các thực thể
Ví dụ trong Visual Basic 6:
Dim myEllipse As vdEllipse
Set myEllipse = VDPro.ActiveDocument.Entities.AddEllipse(Array(0#, 0#, 0#), 3#,
1#)
myEllipse.Invalidate
Ví dụ trong Visual C++ 6.0:
CvdEllipse
ell=m_vdraw.GetActiveDocument().GetEntities().AddEllipse(COlePoint(0,0,0),3,1);
m_vdraw.Redraw();
Xem tương tự trong
vdArc members | Base Class
V. vdRectUUID
{82340CE7-8CF6-4EB2-9B8B-9BA22965E4E5}
Miêu tả
Thuộc đối tượng VectorDraw Rect
Xem các thành viên trong vd Rect members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Áp dụng với hình chữ nhật
Hình chữ nhật được xác định bởi điểm đưa vào, độ quay, chiều dài và chiều rộng.
Hình chữ nhật được vẽ trong một mặt phẳng được xác định bởi điểm đầu vào và vecto
mở rộng (ExtrusionVector)
Để vẽ hình chữ nhật, đơn giản gọi hàm Ad dRect
Ví dụ
Ví dụ trong Visual Basic 6:
Dim myRect As vdRect
Set myRect = VDPro.ActiveDocument.Entities.AddRect(Array(0#, 0#, 0#), 5#, 2#)
myRect.Invalidate
Ví dụ trong Visual C++ 6.0:
CvdRect
rect=m_vdraw.GetActiveDocument().GetEntities().AddRect(COlePoint(0,0,0),5,2);
rect.Invalidate();
Xem tương tự trong
vdArc members | Base Class
1. vdImageUUID
{758F8F0A-CFDF-4E9D-8322-FFB534C14D60}
Miêu tả
Thuộc đối tượng VectorDraw Image
Xem các thành viên trong vd Image members
Bậc thừa kế
vdPrimary
vdFigure
vd Rect
Chú ý
Đây là một đối tượng cơ bản cho việc chèn ảnh vào bản vẽ.
Ảnh chèn vào có thể là: BMP, GIF, JPG, PNG và TIFF ( các định dạng TIFF, GIF, JPN
và PNG đòi hỏi vdimg.dll được thay thế vào trong cùng một folder với VectorDraw
ocx)
Khi ảnh chèn vào là ản 1-bit (B&W) thì màu nền của ảnh (thường là màu trắng) được
hiển thị trong suốt và các màu khác được hiển thị là đen hoặc trắng, phụ thuộc vào
BkColol của điều khiển. Điều này có ích cho việc bản vẽ được quét và chèn vào bản vẽ
khác như một ảnh.
VectorDraw tự động tìm các file ảnh hoặc Xref trong đường dẫn mặc định và trong
SupportPath. VectorDraw sẽ cố gắng định vị file này với một folder xác định. Xem
trong thuộc tính của hàm SupportPath để biết thêm.
Sử dụng Scale để khi thay đổi vẫn giữ được tỉ lệ co bên ngoài của ảnh.
Sử dụng thuộc tính của Display để gán cách mà ảnh sẽ được hiển thị.
Ảnh sẽ được xác định bằng điểm chèn vào, độ quay, chiều rộng và độ cao.
Hình vuông được vẽ trong một mặt phẳng được xác định bở điểm vào và vecto mở rộng.
Để chèn một ảnh, gọi hàm AddImage
Ví dụ
Chèn một ảnh và các dấu nhắc người sử dụng để thay thay đổi đường viền
Ví dụ trong Visual Basic 6:
Dim myImage As vdImage
Set myImage = VDPro.ActiveDocument.Entities.AddImage("c:\winnt\
Rhododendron.bmp", Array(0#, 0#, 0#), 5#)
myImage.Invalidate
MsgBox ("press ok to modify the image")
myImage.Invalidate
myImage.Display = VdImageWithClipNoBorder
myImage.ImageScale = 3
myImage.Update
myImage.Invalidate
Ví dụ trong Visual C++:
CvdImage
myimage=m_vdraw.GetActiveDocument().GetEntities().AddImage("c:\\winnt\\
Rhododendron.bmp",COlePoint(0,0,0),5);
myimage.Invalidate();
AfxMessageBox("Press ok to modify the image");
myimage.Invalidate();
myimage.SetDisplay(VdImageWithClipNoBorder);
myimage.SetImageScale(3);
myimage.Update();
myimage.Invalidate();
2. vdPointUUID
{C497475F-E3A2-405B-AFA7-AD5D82509978}
Miêu tả
Thuộc đối tượng VectorDraw Point
Xem các thành viên trong vd Point members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Để chèn một điểm, gọi hàm AddImage
Xem các thuộc tính của PtMode và PtSize để xem các điểm được hiển thị như thế nào.
Ví dụ
Vẽ một điểm lên màn hình
Ví dụ trong Visual Basic 6:
Dim myPoint As vdPoint
Set myPoint = VDPro.ActiveDocument.Entities.AddPoint(Array(0#, 3#, 0#))
myPoint.Invalidate
Ví dụ trong Visual C++ 6.0:
CvdPoint
pt=m_vdraw.GetActiveDocument().GetEntities().AddPoint(COlePoint(1,2,3));
pt.Invalidate();
3. vd3DFaceUUID
{873CEE5C-1B27-419A-8932-70E7CA6AAB50}
Miêu tả
Thuộc đối tượng VectorDraw 3dface
Xem các thành viên trong vd 3DFace members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Là một đối tượng có một đỉnh chóp với bốn điểm giống như Point(x,y,z) trong World
CS. Điểm thứ tư tương tự như điểm đầu tiên ( giống như hình tam giác).
Để chèn một điểm, gọi hàm Ad d3DFace
Tương tự xem trong thuộc tính của Visibility và hàm SetInvisibleEdge
Ví dụ
Ví dụ trong Visual Basic 6:
Dim my3DFace As vd3DFace
Set my3DFace = VDPro.ActiveDocument.Entities.Add3DFace(Array(Array(0#, 0#,
0#), Array(3#, 0#, 0#), Array(1.5, 3#, 0#), Array(0#, 0#, 0#)))
my3DFace.Invalidate
MsgBox ("press ok to change the 3Dface")
my3DFace.Invalidate
my3DFace.PenColor = 1
my3DFace.SetInvisibleEdge 0, 1
my3DFace.VertexList = Array(Array(0#, 0#, 0#), Array(3#, 0#, 0#), Array(4#, 1#, 0#),
Array(0#, 0#, 0#))
my3DFace.Visibility = 5
my3DFace.Update
my3DFace.Invalidate
Ví dụ trong Visual C++ 6.0:
COlePointArray pArray;
pArray.Add(COlePoint(0,0,0));
pArray.Add(COlePoint(3,0,0));
pArray.Add(COlePoint(1.5,3,0));
pArray.Add(COlePoint(0,0,0));
Cvd3DFace
my3dface=m_vdraw.GetActiveDocument().GetEntities().Add3DFace(pArray);
my3dface.Invalidate();
AfxMessageBox("press ok to change the 3Dface");
my3dface.Invalidate();
my3dface.GetPenColor().SetColorIndex(1);
my3dface.SetInvisibleEdge(0,1);
pArray.RemoveAll();
pArray.Add(COlePoint(0,0,0));
pArray.Add(COlePoint(3,0,0));
pArray.Add(COlePoint(4,1,0));
pArray.Add(COlePoint(0,0,0));
my3dface.SetVertexList(pArray);
my3dface.SetVisibility(5);
my3dface.Update();
my3dface.Invalidate();
4. vdViewportUUID
{8CC18ED4-3CA5-4252-B6FA-78B3918769FE}
Miêu tả
Thuộc đối tượng VectorDraw ViewPort
Xem các thành viên trong vd Viewport members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
// phai co hinh
Giả sử nó hỗ trợ mô hình ModelSpace.
ViewPort được coi như đối tượng vẽ hình chữ nhật và có thể di chuyển hoặc thay đổi
kích thước.
Chúng có thể được tạo trong một tập hợp Entitylist của một Layout khác hơn là trong
ModelSpace
Những hình chữ nhật mà được điền bởi các ảnh của các ModelSpace trong độ co giãn
khác nhau thường phụ thuộc vào các thuộc tính của ViewSize và ViewCenter. Với cách
này trong một trang giấy, bạn có thể in ra với nhiều cảnh khác nhau (với độ co giãn
khác nhau) của cùng một bản vẽ (ModelSpace) hoặc các phần của bản vẽ này.
Trong viewport áp dụng các lệnh Pan, Zoom và View3D của vdCommandAction, khi
Viewport là Active ( xem trong thuộc tính ActiveViewport của Layout) và thuộc tính
ModelSpace của vdLayout có giá trị SPACEMODE_MODEL
VectorDraw có một dung lượng lớn cho người dùng có thể thay đổi ActiveViewport bằng cách
đơn giản click vào viewport khi SpaceMode của ActiveLayout là SPACEMODE_MODEL
(=0).
Để thêm một Viewport, gọi hàm AddViewPort
Nếu bạn muốn thêm một layout và viewport trong layout này thì bên trong viewport sẽ
có các thực thể của Model.
Ví dụ
Tạo một box, một layout và 5 viewport. Một Viewport có hình tròn
Ví dụ trong Visual Basic 6:
Dim lay1 As vdLayout
Dim vport As vdViewport
Dim laylst As Variant
Dim circ As vdCircle
Dim boundary As Variant
VDPro.CommandAction.CmdBox3d Array(0#, 0#, 0#), 15#, 10#, 5#, 0#
Set lay1 = VDPro.ActiveDocument.LayOuts.Add("MYLAYOUT")
lay1.ViewCenter = Array(0, 0)
lay1.ViewSize = 100
Set vport = lay1.Entities.AddViewPort(Array(0, 0), 80, 30)
vport.ViewCenter = Array(0, 0)
vport.ViewSize = 30
vport.TargetPoint = Array(30, 15, 7.5)
vport.Axis3DRotations = Array(90#, 0#, 0#)
vport.showEdge = 0
vport.View3DMode = VDProLib5.VdConstDrawMode.vdc_RENDER
Set vport = lay1.Entities.AddViewPort(Array(-20, -25), 40, 20)
vport.ViewCenter = Array(0, 0)
vport.ViewSize = 30
vport.TargetPoint = Array(30, 15, 7.5)
vport.Axis3DRotations = Array(90#, 0#, 90#)
vport.showEdge = 0
vport.View3DMode = VDProLib5.VdConstDrawMode.vdc_SHADE
Set vport = lay1.Entities.AddViewPort(Array(20, -25), 40, 20)
vport.ViewCenter = Array(0, 0)
vport.TargetPoint = Array(30, 15, 7.5)
vport.ViewSize = 30
vport.Axis3DRotations = Array(90#, 0#, -90#)
vport.showEdge = 0
vport.View3DMode = VDProLib5.VdConstDrawMode.vdc_SHADE
Set circ = lay1.Entities.AddCircle(Array(0, 30), 14)
boundary = circ.GetBoundingBox
Set vport = lay1.Entities.AddViewPort(Array((boundary(0) + boundary(2)) / 2#, _
(boundary(1) + boundary(3)) / 2#), _
boundary(2) - boundary(0), _boundary(3) - boundary(1))
vport.ClipObjHandle = circ.Handle
vport.ViewCenter = Array(-15, 0, 0)
vport.TargetPoint = Array(30, 15, 7.5)
vport.ViewSize = 40
vport.Axis3DRotations = Array(45#, 0#, 45#)
vport.showEdge = 0
vport.View3DMode = VDProLib5.VdConstDrawMode.vdc_SHADE
Set vport = lay1.Entities.AddViewPort(Array(70, 0), 60, 90)
vport.ViewCenter = Array(0, 0, 0)
vport.ViewSize = 70
vport.TargetPoint = Array(30, 15, 7.5)
vport.Axis3DRotations = Array(0#, 0#, 270#)
Set VDPro.ActiveDocument.ActiveLayOut = lay1
VDPro.CommandAction.Zoom "E", 0, 0
Set vport = Nothing
Ví dụ trong Visual C++ 6.0:
m_vdraw.GetCommandAction().CmdBox3d(COlePoint(0,0,0),COleDouble(15),COleD
ouble(10),COleDouble(5),COleDouble(0));
CvdLayout lay1=m_vdraw.GetActiveDocument().GetLayOuts().Add("MYLAYOUT");
lay1.SetViewCenter(COlePoint(0,0,0));
lay1.SetViewSize(100);
CvdViewport vport=lay1.GetEntities().AddViewPort(COlePoint(0,0,0),80,30);
vport.SetViewCenter(COlePoint(0,0,0));
vport.SetViewSize(30);
vport.SetTargetPoint(COlePoint(30,15,7.5));
COleDoubleArray rot;
rot.AddValue(90);
rot.AddValue(0);
rot.AddValue(0);
vport.SetAxis3DRotations(rot);
vport.SetShowEdge(0);
vport.SetView3DMode(vdc_RENDER);
vport=lay1.GetEntities().AddViewPort(COlePoint(-20,-25,0),40,20);
vport.SetViewCenter(COlePoint(0,0,0));
vport.SetViewSize(30);
vport.SetTargetPoint(COlePoint(30,15,7.5));
rot.RemoveAll();
rot.AddValue(90);
rot.AddValue(0);
rot.AddValue(90);
vport.SetAxis3DRotations(rot);
vport.SetShowEdge(0);
vport.SetView3DMode(vdc_SHADE);
vport=lay1.GetEntities().AddViewPort(COlePoint(20,-25,0),40,20);
vport.SetViewCenter(COlePoint(0,0,0));
vport.SetViewSize(30);
vport.SetTargetPoint(COlePoint(30,15,7.5));
rot.RemoveAll();
rot.AddValue(90);
rot.AddValue(0);
rot.AddValue(-90);
vport.SetAxis3DRotations(rot);
vport.SetShowEdge(0);
vport.SetView3DMode(vdc_SHADE);
CvdCircle circ=lay1.GetEntities().AddCircle(COlePoint(0,30,0),14);
COleDoubleArray dArray;
dArray=circ.GetBoundingBox();
vport=lay1.GetEntities().AddViewPort(COlePoint( (dArray[0]+dArray[2])/2,
(dArray[1]+dArray[3])/2,0),dArray[2]+dArray[0],dArray[3]+dArray[1]);
vport.SetClipObjHandle(circ.GetHandle());
vport.SetViewCenter(COlePoint(-15,0,0));
vport.SetViewSize(40);
vport.SetTargetPoint(COlePoint(30,15,7.5));
rot.RemoveAll();
rot.AddValue(45);
rot.AddValue(0);
rot.AddValue(45);
vport.SetAxis3DRotations(rot);
vport.SetShowEdge(0);
vport.SetView3DMode(vdc_SHADE);
vport=lay1.GetEntities().AddViewPort(COlePoint(70,0,0),60,90);
vport.SetViewCenter(COlePoint(0,0,0));
vport.SetViewSize(70);
vport.SetTargetPoint(COlePoint(30,15,7.5));
rot.RemoveAll();
rot.AddValue(0);
rot.AddValue(0);
rot.AddValue(270);
m_vdraw.GetActiveDocument().SetRefActiveLayOut(lay1);
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
VI. vdTextUUID
{5FC9DE05-B2E3-446E-9F82-636F32FC1C78}
Miêu tả
Thuộc đối tượng VectorDraw Text
Xem các thành viên trong vd Text members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
Ứng dụng cho một dòng đơn của các chữ số. Những đốitượng này chỉ là một dòng đơn
của text
Để tạo một text, sử dụng phương pháp AddText.
Có thể sử dụng kiể font TrueType hoặc SHX
Text thường được vẽ kiểu vdTextStyle. Nếu không xác định kiểu nó sẽ để là ActiveTextStyle.
Nếu chuỗi "%%U" hoặc "%%u" bắt đầu trong một text thì text sẽ bị gạch dưới
Có một vài chữ đặc biệt sẽ được dịch khác đi:
%%D hoặc %%d trở thành Ascii 176, Degrees Sign
%%P hoặc %%p trở thành Ascii 177, Plus & Minus sign
%%C hoặc %%c trở thành Ascii 248, biểu tượng rỗng
Việc thêm mã Ascii, bạn có thể sử dụng %%<Ascii-code> giống như %%174,
để vẽ "Biểu tượng thanh ghi"
Khi font là SHX thì các chữ Extra Unicode có thể được dịch thành "\U+xxxx"
trong đó xxxx là một giá trị hexadecimal tồn tại trong file font SHX. Nếu giá trị
hexadecimal không tồn tại thì nó sẽ hiển thị giống như <?>.
Ví dụ: đoạn văn bản "abcd\U+0035efg" sẽ được hiển thị giống như "abcd5efg"
Ví dụ
Thêm một văn bản và thay đổi đặc tính của nó.
Ví dụ trong Visual Basic 6:
Dim myText As vdText
Dim p As Double
p = 3.141592654
Set myText = VDPro.ActiveDocument.Entities.AddText("MY NAME IS >>>>>>>",
Array(0#, 0#, 0#), 3#)
myText.Invalidate
VDPro.CommandAction.Zoom "E", 0, 0
MsgBox ("Press ok to change the Text")
myText.Invalidate
myText.Flag = 4
myText.Height = 10
myText.HorJustify = VdTextHorCenter
myText.InsertionPoint = Array(30#, 0#, 0#)
myText.Rotation = p / 4
myText.TextString = "NEW NAME ....."
myText.VerJustify = VdTextVerBaseLine
myText.WidthFactor = 3
VDPro.CommandAction.Zoom "E", 0, 0
Ví dụ trong Visual C++ 6.0:
double pi=3.141592654;
CvdText mytxt=m_vdraw.GetActiveDocument().GetEntities().AddText("my name is
",COlePoint(0,0,0),3);
mytxt.Invalidate();
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
AfxMessageBox("Press ok to change the Text");
mytxt.Invalidate();
mytxt.SetFlag(4);
mytxt.SetHeight(10);
mytxt.SetHorJustify(VdTextHorCenter);
mytxt.SetInsertionPoint(COlePoint(30,0,0));
mytxt.SetRotation(pi/4);
mytxt.SetTextString("new name");
mytxt.SetVerJustify(VdTextVerBaseLine);
mytxt.SetWidthFactor(3);
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
1. vdAttribUUID
{9CFEBB93-07A7-4F1D-9304-38CD4CD9580D}
Miêu tả
Thuộc đối tượng VectorDraw Attribute
Xem các thành viên trong vd Attrib members
Bậc thừa kế
vdPrimary
vdFigure
vdText
Chú ý
Sẽ rất có ích nếu một đối tượng xuất hiện như một chuỗi văn bản và miêu tả đặc tính
của một thuộc tính khác được thêm vào trong một block sử dụng AddAttrib Method. Nếu
bạn chèn một block vào trong một tập hợp các thực thể sử dụng phương pháp InsertBlock thì một
bản sao của các các thuộc tính đó sẽ được thêm vào tập hợp các Attribute của một đối tượng được
chèn, hiển thị các giá trị mặc định của nó.
Ví dụ
Tạo một block và thêm vào đó hình vòng cung màu đỏ, hình tròn vàng, đường màu xanh, đa nét màu
lục lam và một thuộc tính đúng. Cuối cùng tạo một block ví dụ của block đã được tạo. Sau cùng hiển
thị số thuộc tính được chèn.
Ví dụ trong Visual Basic 6:
Dim Ins As vdInsert
Dim Blk As vdBlock
Dim Arc As vdArc
Dim Circl As vdCircle
Dim PLine As vdPolyline
Dim Line As vdLine
Dim Attrib As vdAttrib
VDPro.CommandAction.Zoom "W", Array(-6, -6), Array(8, 8)
Set Blk = VDPro.ActiveDocument.Blocks.Add("Block1", Array(0, 0))
Set Arc = Blk.AddArc(Array(0, 0), 5#, 0#, 1.57)
Arc.PenColor = VDProLib5.VdColorRed
Set Circl = Blk.AddCircle(Array(0, 0), 3#)
Circl.PenColor = VDProLib5.VdColorYellow
Set Line = Blk.AddLine(Array(-5, -5), Array(5, 5))
Line.PenColor = VDProLib5.VdColorGreen
Set PLine = Blk.AddPolyLine(Array(Array(-5, -5), Array(-5, 5), Array(5, 5),
Array(5, -5), Array(-5, -5)))
PLine.PenColor = VDProLib5.VdColorCyan
Set Attrib = Blk.AddAttrib(False, "ATTRIBTEST", "AttribTest:", "VDRAW_1",
Array(0, 0), 1.5)
Attrib.HorJustify = VDProLib5.VdTextHorCenter
Attrib.VerJustify = VDProLib5.VdTextVerBaseLine
Attrib.PenColor = VDProLib5.VdColorMagenta
MsgBox ("Block1 was successfuly createted.")
Set Ins = VDPro.ActiveDocument.Entities.InsertBlock(Array(0, 0), "Block1", 1, 1, 0)
Ins.SetAttribValue "ATTRIBTEST", "new value"
Ins.Invalidate
MsgBox "Number of attributes in insert :" & Ins.GetNumOfAttributes
Ví dụ trong Visual C++ 6.0:
m_vdraw.GetCommandAction().Zoom(COleString("W"),COlePoint(-6,-
6,0),COlePoint(8,8,0));
CvdBlock
blk=m_vdraw.GetActiveDocument().GetBlocks().Add("block1",COlePoint(0,0,0));
CvdArc arc =blk.AddArc(COlePoint(0,0,0),5,0,1.57);
arc.GetPenColor().SetColorIndex(VdColorRed);
CvdCircle cir=blk.AddCircle(COlePoint(0,0,0),3);
cir.GetPenColor().SetColorIndex(VdColorYellow);
CvdLine line=blk.AddLine(COlePoint(-5,-5,0),COlePoint(5,5,0));
line.GetPenColor().SetColorIndex(VdColorGreen);
COlePointArray pArray;
pArray.Add(COlePoint(-5,-5,0));
pArray.Add(COlePoint(-5,5,0));
pArray.Add(COlePoint(5,5,0));
pArray.Add(COlePoint(5,-5,0));
pArray.Add(COlePoint(-5,-5,0));
CvdPolyline pl=blk.AddPolyLine(pArray);
pl.GetPenColor().SetColorIndex(VdColorCyan);
CvdAttrib att=blk.AddAttrib(FALSE,"ATTRIBTEST", "AttribTest:", "VDRAW_1",
COlePoint(0,0,0), 1.5);
att.SetHorJustify(VdTextHorCenter);
att.SetVerJustify(VdTextVerBaseLine);
att.GetPenColor().SetColorIndex(VdColorMagenta);
AfxMessageBox("Block1 was successfuly createted.");
CvdInsert
ins=m_vdraw.GetActiveDocument().GetEntities().InsertBlock(COlePoint(0,0,0),"block
1",1,1,0);
ins.SetAttribValue("ATTRIBTEST", "new value");
ins.Invalidate();
CString s;
s.Format("Number of attributes in insert %d",ins.GetNumOfAttributes());
AfxMessageBox(s);
2. vdDimensionUUID
{9403417C-5686-4D0B-954C-8965C5723514}
Miêu tả
Thuộc đối tượng VectorDraw Dimension
Xem các thành viên trong vd Dimension members
Bậc thừa kế
vdPrimary
vdFigure
vdText
Chú ý
Việc đo kích thước tuyến tính khoảng cách giữa hai điểm được hiển thị song song với
các điểm khác đang được đo lường. Trong các đo lường đã được căn lề, dòng đo lường
sẽ song song với dòng ban đầu. Các dòng ban đầu được xác định sử dụng thuộc tính của
DefPoint1 và DefPoint2:
HÌnh vẽ
Để vẽ một Dimension gọi hàm AddDimAligned, AddDimAngular, AddDimDiameter,
AddDimRadial và/ hoặc AddDimRotated.
Ví dụ
Xem ví dụ trong vdDimstyle
3. vdInsertUUID
{97139F55-C05A-44E2-93DF-513931D36962}
Miêu tả
Thuộc đối tượng VectorDraw Insert
Xem các thành viên trong vd Insert members
Bậc thừa kế
vdPrimary
vdFigure
vdText
Chú ý
Trong ví dụ một block đang được vẽ, bạn có thể có rất nhiều sự kiện của vdInsert cho một block
mà bạn muốn.
Để thêm hoặc vẽ một sự kiện đơn giản gọi hàm InsertBlock, CmdInsertBlockDialog và/hoặc
CmdInsert
Đối tượng vdInsert cũng là một tập hợp của các thuộc tính. Bạn có thể có văn bản động trong
vdInsert bằng cách thêm vdAttrib vào trong blocks của bạn. Bạn cũng có thể điều khiển các giá trị
của thuộc tính vào trong sự kiện. Nếu block không có vdAttrib bên trong thì tập hợp của vdInsert sẽ
bị trống.
Nếu bạn muốn thay đổi thuộc tính của PenColor và PenStyle của một block, thì block phải có các
đặc điểm sau :
Tất cả Entities được vẽ trong Layer 0
Entities' PenColor = 0 (bằng layer)
Entities' PenStyle = VdPenByLayer (bằng layer)
Hoặc (chỉ cho PenColor hoặc PenStyle)
Entities' PenColor = 256 (bằng Block). Layer và PenStyle có thể là bất kì.
Ví dụ
Ví dụ trong Visual Basic 6:
Dim Ins As vdInsert
Dim Blk As vdBlock
Dim Arc As vdArc
Dim Circl As vdCircle
Dim PLine As vdPolyline
Dim Line As vdLine
Dim Attrib As vdAttrib
VDPro.CommandAction.Zoom "W", Array(-6, -6), Array(8, 8)
Set Blk = VDPro.ActiveDocument.Blocks.Add("Block1", Array(0, 0))
Set Arc = Blk.AddArc(Array(0, 0), 5#, 0#, 1.57)
Arc.PenColor = VDProLib5.VdColorRed
Set Circl = Blk.AddCircle(Array(0, 0), 3#)
Circl.PenColor = VDProLib5.VdColorYellow
Set Line = Blk.AddLine(Array(-5, -5), Array(5, 5))
Line.PenColor = VDProLib5.VdColorGreen
Set PLine = Blk.AddPolyLine(Array(Array(-5, -5), Array(-5, 5), Array(5, 5),
Array(5, -5), Array(-5, -5)))
PLine.PenColor = VDProLib5.VdColorCyan
Set Attrib = Blk.AddAttrib(False, "ATTRIBTEST", "AttribTest:", "VDRAW_1",
Array(0, 0), 1.5)
Attrib.HorJustify = VDProLib5.VdTextHorCenter
Attrib.VerJustify = VDProLib5.VdTextVerBaseLine
Attrib.PenColor = VDProLib5.VdColorMagenta
MsgBox ("Block1 was successfuly createted.")
Set Ins = VDPro.ActiveDocument.Entities.InsertBlock(Array(0, 0), "Block1", 1, 1, 0)
Ins.SetAttribValue "ATTRIBTEST", "new value"
Ins.Invalidate
Ví dụ trong Visual C++ 6.0:
m_vdraw.GetCommandAction().Zoom(COleString("W"),COlePoint(-6,-
6,0),COlePoint(8,8,0));
CvdBlock
blk=m_vdraw.GetActiveDocument().GetBlocks().Add("block1",COlePoint(0,0,0));
CvdArc arc =blk.AddArc(COlePoint(0,0,0),5,0,1.57);
arc.GetPenColor().SetColorIndex(VdColorRed);
CvdCircle cir=blk.AddCircle(COlePoint(0,0,0),3);
cir.GetPenColor().SetColorIndex(VdColorYellow);
CvdLine line=blk.AddLine(COlePoint(-5,-5,0),COlePoint(5,5,0));
line.GetPenColor().SetColorIndex(VdColorGreen);
COlePointArray pArray;
pArray.Add(COlePoint(-5,-5,0));
pArray.Add(COlePoint(-5,5,0));
pArray.Add(COlePoint(5,5,0));
pArray.Add(COlePoint(5,-5,0));
pArray.Add(COlePoint(-5,-5,0));
CvdPolyline pl=blk.AddPolyLine(pArray);
pl.GetPenColor().SetColorIndex(VdColorCyan);
CvdAttrib att=blk.AddAttrib(FALSE,"ATTRIBTEST", "AttribTest:", "VDRAW_1",
COlePoint(0,0,0), 1.5);
att.SetHorJustify(VdTextHorCenter);
att.SetVerJustify(VdTextVerBaseLine);
att.GetPenColor().SetColorIndex(VdColorMagenta);
AfxMessageBox("Block1 was successfuly createted.");
CvdInsert
ins=m_vdraw.GetActiveDocument().GetEntities().InsertBlock(COlePoint(0,0,0),"block
1",1,1,0);
ins.SetAttribValue("ATTRIBTEST", "new value");
ins.Invalidate();
4. vdPolyhatchUUID
{56D28BD5-E96A-45B6-A105-9A5354C65E53}
Miêu tả
Thuộc đối tượng VectorDraw PolyHatch
Xem các thành viên trong vd PolyHatch members
Bậc thừa kế
vdPrimary
vdFigure
Chú ý
vdPolyhatch là một tập hợp chứa PolyLine
Mỗi PolyLine đại diện cho một Hatch trừ từ toàn bộ tập hợp hoặc được bao gồm trong
một tập hợp. Bạn có thể điều khiển nó, sử dụng thuộc tính của CombineList. Nếu
CombineList = 16 thì nó sẽ bị trừ ra, còn không nó sẽ bao gồm trong một hợp.
Ban có thể sử dụng phương pháp Item, Count để truy cập các đối tượng của PolyLine của
vdPolyhatch.
Để vẽ một Polyhatch, gọi hàm AddPolyHatch
Các đối tượng của Polyhatch không bao gồm các dòng nét đậm
PolyHatch trong 3D được hiển thị như solid, được điền bằng FillColor
Ví dụ
1. Ví dụ trong Visual Basic 6:
Dim ph As vdPolyhatch
Set ph = VDPro.ActiveDocument.Entities.AddPolyHatch
ph.AddPolyPath 0, Array(Array(0, 0, 0), Array(5, 0, 0), Array(5, 5, 0), Array(0, 5, 0),
Array(0, 0, 0))
ph.AddPolyPath 0, Array(Array(4, 1.5, 0), Array(6, 1.5, 0), Array(6, 3.5, 0), Array(4,
3.5, 0),
Array(4, 1.5, 0))
ph.FillMode = VdFillModeNone
VDPro.Redraw
2. Ví dụ trong Visual C++ 6.0:
CvdPolyhatch ph=m_vdraw.GetActiveDocument().GetEntities().AddPolyHatch();
COlePointArray pArray;
pArray.Add(COlePoint(0,0,0));
pArray.Add(COlePoint(5,0,0));
pArray.Add(COlePoint(5,5,0));
pArray.Add(COlePoint(0,5,0));
pArray.Add(COlePoint(0,0,0));
ph.AddPolyPath(0,pArray);
pArray.RemoveAll();
pArray.Add(COlePoint(4, 1.5, 0));
pArray.Add(COlePoint(6, 1.5, 0));
pArray.Add(COlePoint(6, 3.5, 0));
pArray.Add(COlePoint(4, 3.5, 0));
pArray.Add(COlePoint(4, 1.5, 0));
ph.AddPolyPath(0,pArray);
ph.SetFillMode(VdFillModeNone);
m_vdraw.Redraw();
VII. vdLayerUUID
{8C690220-A17A-4ECC-B042-AB7727B67A40}
Miêu tả
Thuộc đối tượng VectorDraw Layer
Xem các thành viên trong vd Layer members
Bậc thừa kế
vdPrimary
Chú ý
Là một nhóm dữ liệu logic, tương tự như phủ axeton trong suốt vào trong bản vẽ.
Các Layer tương đương với các bao phủ (overlay) sử dụng trong vẽ thiết kế dựa trên
giấy. Chúng là các công cụ tổ chức chính trong VectorDraw, và bạn có thể sử dụng
chúng để nhóm thông tin bằng hàm và làm cho linetype, color và các chuẩn khác có
hiệu lực.
Sử dụng VectorDraw bạn có thể Freeze(Hide), Thaw(Show) và Lock các tầng. Việc tổ
chức các Layer và các đối tượng trong Layer làm cho dễ dàng quản lí thông tin khi vẽ.
VectorDraw luôn có một layer tên là “0” mà không thể xóa hoặc đổi tên.
Bằng việc điều khiển xem liệu một trạng thái của Layer là Thaw hoặc Frozen, bạn có
thể thay đổi sự xuất hiện của bản vẽ để hiển thị chỉ một thông tin trong Layer đã được
chỉ ra. Đóng băng các Layer không được sử dụng sẽ giúp cho hiệu suất của
VectorDraw.
Tất cả các đối tượng mới được thêm vào trong một tầng đang hoạt động nếu nó không
chỉ định rõ vào tầng nào.
Để tạo một tầng họat động, sử dụng thuộc tính ActiveLayer
Để tạo một tầng sử dụng hàm Add
Ví dụ
Hinh ve
Trong hình vẽ dưới đây (hình 1) có 3 kiểu: wall (các đường và Polyline với màu đỏ), door&window
(màu xanh) và furniture (đỏ tươi). Những đối tượng này được nhóm lại và được vẽ trên các tầng
khác nhau. Các wall trong tầng “WALL”, các door&window đặt trong tầng “WIN_DOORS” và
furniture đặt trong tầng “FURNITURE”
VIII. vdTextstyleUUID
{6B67AE22-355B-4FA2-818E-01C5E2D49249}
Miêu tả
Thuộc đối tượng VectorDraw Textstyle
Xem các thành viên trong vd Textstyle members
Bậc thừa kế
vdPrimary
Chú ý
Kiểu chữ là một tập hợp các cài đặt xác định sự xuất hiện của các dòng văn bản
Các kiểu chữ ( thiết lập bằng thuộc tính của ActiveTextStyle) xác định sự xuất hiện của các
dòng văn bản mới được tạo trong bản vẽ. StyleName của văn bản sẽ lấy giá trị của
thuộc tính ActiveTextStyle.
Chú ý: Khi các thuộc tính của Kiểu chữ thay đổi, khi gọi đến hàm RegenAll sẽ cần phải
biết đến sự thay đổi của văn bản.
VectorDraw luôn có một kiểu chữ là “STANDARD” mà không thể xóa hoặc đổi tên
được.
Phiên bản 4.0.2.1020 và các kiểu trên nên dùng với TTF, nơi mà một hằng số mới của
thuộc thính Kiểu chữ là Extra sẽ được thêm vào (VdTextStyleDrawOutline = 1024).
Extra vẽ văn bản TTF như vector đường bao nhưng nó xóa các văn bản hiển thị nét đặc
biệt khi văn bản có chiều cao rất nhỏ trên màn hình.
Việc căn lề, xác định cỡ chữ, vị trí văn bản nên dùng font SHX thay cho TTF.
IX. vdDimstyleUUID
{6B67AE22-355B-4FA2-818E-01C5E2D49249}
Miêu tả
Thuộc đối tượng VectorDraw Dimstyle
Xem các thành viên trong vd Dimstyle members
Bậc thừa kế
vdPrimary
Chú ý
Hình vẽ
Một kiểu dimension là một nhóm các cài đặt kích thước xác định sự xuất hiện của một
kích thước.
Kiểu dimension hoạt động (thiết lập bằng ActiveDimStyle property) xác định sự xuất hiện
của một dimension mới được tạo trong bản vẽ.
Để thay đổi kiểu của một dimension đã tồn tại, sử dụng thuộc tính StyleName tìm thấy
trong dimension.
Bạn cũng có thể thay đổi một hoặc nhiều đối tượng dimension sử dụng thuộc tính viết
đè dimension (phương pháp SetDimOverWriteValue và GetDimOverWriteValue ).
Ví dụ
Tạo một dimstyle mới và thiết lập giá trị cho thuộc tính của nó. Cuối cùng thêm một
dimension vào trong tập hợp.
Ví dụ trong Visual Basic 6:
Dim mydim As vdDimension
Dim myds As vdDimstyle
Set myds = VDPro.ActiveDocument.DimStyles.Add("mydimstyle")
myds.DimTol = True
myds.DimTm = 0.1
myds.DimTp = 0.2
myds.ArrowSize = 1
myds.DimLineColor = VdColorYellow
myds.ExtLineColor = VdColorMagenta
myds.ExtLineDist1 = 1
myds.ExtLineDist2 = 0.01
myds.DecimalPrecision = 2
Dim myline As vdLine
Set myline = VDPro.ActiveDocument.Entities.AddLine(Array(5#, 5#, 0#),
Array(10#, 10#, 0#))
myline.Invalidate
Set mydim = VDPro.ActiveDocument.Entities.AddDimAligned(Array(5, 5),
Array(10, 10), Array(6, 7))
mydim.dimText = "The length is : \P<>"
VDPro.CommandAction.Zoom "E", 0, 0
Ví dụ trong Visual C++ 6.0:
CvdDimstyle
myds=m_vdraw.GetActiveDocument().GetDimStyles().Add("mydimstyle");
myds.SetDimTol(TRUE);
myds.SetDimTm(0.1);
myds.SetDimTp(0.2);
myds.SetArrowSize(1);
myds.GetDimLineColor().SetColorIndex(VdColorYellow);
myds.GetExtLineColor().SetColorIndex(VdColorMagenta);
myds.SetExtLineDist1(1);
myds.SetExtLineDist2(0.01);
myds.SetDecimalPrecision(2);
CvdLine
myLine=m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(5,5,0),COl
ePoint(10,10,0));
myLine.Invalidate();
CvdDimension
mydim=m_vdraw.GetActiveDocument().GetEntities().AddDimAligned(COlePoint(5,5)
,COlePoint(10,10,0),COlePoint(6,7,0));
mydim.SetDimText("The length is : \\P<>");
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
X. vdBlockUUID
{49880927-CF45-48E2-9AB4-3A0A4578EE27}
Miêu tả
Thuộc đối tượng VectorDraw Block
Xem các thành viên trong vd Block members
Bậc thừa kế
vdPrimary
Chú ý
Một block là một tập hợp của các đối tượng mà bạn có thể gắn kết các đối tượng đơn lẻ
hoặc một khối lại với nhau. Bạn có thể chèn, căn lề và xoay một block trong một bản
vẽ. Bạn cũng có thể bung một block thành các thành phần riêng, thay đổi chúng và xác
định lại thành block khác.
Block hợp lí hóa các qui trình vẽ. Ví dụ bạn có thể sử dụng block để:
Xây dựng một thư viện chuẩn cho việc sử dụng các biểu tượng, các thành phần
hoặc các phần chuẩn một cách thường xuyên. Bạn có thể chèn một block nhiều
lần thay thế cho việc tạo lại các phần tử vẽ.
Sửa lại bản vẽ một cách hiệu quả bằng cách chèn, xây dựng lại và copy block
như các thành phần hơn là với các đối tượng riêng lẻ
Ghi vào đĩa bằng cách chứa tất cả những mối liên quan tới một block thành một
block trong cơ sở dữ liệu của bản vẽ.
Khi bạn chèn một block vào trong bản vẽ, tức là bạn đang tạo một block. Mỗi lần bạn
chèn một block, bạn gán một nhân tố co giãn và một góc quay cho block đó. Bạn cũng
cần phải căn lề block sử dụng các giá trị khác nhau theo một hướng (X,Y,Z) bất kì.
Block có thể giúp bạn tổ chức các công việc vẽ theo một cách có hệ thống, vì vậy bạn
có thể cài đặt, thiết kế lại và phân loại các đối tượng trong bản vẽ và các thông tin liên
quan đến chúng.
Cẩn thận:
Một vấn đề chung (khi người lập trình không hiểu đúng sự khác nhau giữa block và sự
lồng nhau) là khi một block có chứa một block bên trong nó.
Ví dụ:
Tạo Block 1
Chèn một block thành Insert1
Gán Insert1 vào trong Block1
Hoặc:
Tạo Block1
Chèn một block thành Insert1
Tạo Block2
Gán Insert1 vào Block2
Chèn một Block2 thành Insert2
Gán Insert2 vào Block1.
Mẹo nhỏ:
Nếu bạn muốn thay đổi thuộc tính PenColor và PenStyle của một block được chèn, thì
block đó phải có những đặt tính sau:
Tất cả các thực thể được vẽ trong Layer 0
PenColor = 0 (trong layer)
PenStyle = VdPenByLayer (trong layer)
Hoặc (chỉ PenColor hoặc PenStyle)
PenColor = 256 (trong Block). Layer và PenStyle bất kì
Ví dụ
Tạo một block và chèn nó vào một vòng tròn, một đường thẳng, một đa đường, một
hình tròn và một thuộc tính. Mỗi hình có một màu khác nhau. Cuối cùng một instance
của được chèn vào bản vẽ.
Ví dụ trong Visual Basic 6:
Dim Ins As vdInsert
Dim Blk As vdBlock
Dim Arc As vdArc
Dim Circl As vdCircle
Dim PLine As vdPolyline
Dim Line As vdLine
Dim Attrib As vdAttrib
VDPro.CommandAction.Zoom "W", Array(-6, -6), Array(8, 8)
Set Blk = VDPro.ActiveDocument.Blocks.Add("Block1", Array(0, 0))
Set Arc = Blk.AddArc(Array(0, 0), 5#, 0#, 1.57)
Arc.PenColor = VDProLib5.VdColorRed
Set Circl = Blk.AddCircle(Array(0, 0), 3#)
Circl.PenColor = VDProLib5.VdColorYellow
Set Line = Blk.AddLine(Array(-5, -5), Array(5, 5))
Line.PenColor = VDProLib5.VdColorGreen
Set PLine = Blk.AddPolyLine(Array(Array(-5, -5), Array(-5, 5), Array(5, 5),
Array(5, -5), Array(-5, -5)))
PLine.PenColor = VDProLib5.VdColorCyan
Set Attrib = Blk.AddAttrib(False, "ATTRIBTEST", "AttribTest:", "VDRAW_1",
Array(0, 0), 1.5)
Attrib.HorJustify = VDProLib5.VdTextHorCenter
Attrib.VerJustify = VDProLib5.VdTextVerBaseLine
Attrib.PenColor = VDProLib5.VdColorMagenta
MsgBox ("Block1 was successfuly createted.")
Set Ins = VDPro.ActiveDocument.Entities.InsertBlock(Array(0, 0), "Block1", 1, 1, 0)
Ins.SetAttribValue "ATTRIBTEST", "VDRAW_1"
VDPro.Redraw
Ví dụ trong Visual C++ 6.0:
m_vdraw.GetCommandAction().Zoom(COleString("W"),COlePoint(-6,-
6),COlePoint(8,8));
CvdBlock blk=m_vdraw.GetActiveDocument().GetBlocks().Add("Block1",
COlePoint(0,0,0));
CvdArc arc=blk.AddArc(COlePoint(0,0,0), 5, 0, 1.57);
arc.GetPenColor().SetColorIndex(VdColorRed);
CvdCircle circle=blk.AddCircle(COlePoint(0,0,0), 3);
circle.GetPenColor().SetColorIndex(VdColorYellow);
CvdLine line=blk.AddLine(COlePoint(-5,-5,0), COlePoint(5,5,0));
line.GetPenColor().SetColorIndex(VdColorGreen);
COlePointArray pArray;
pArray.Add(COlePoint(-5,-5,0));
pArray.Add(COlePoint(-5, 5,0));
pArray.Add(COlePoint(5, 5, 0));
pArray.Add(COlePoint(5,-5,0));
pArray.Add(COlePoint(-5,-5,0));
CvdPolyline pLine=blk.AddPolyLine(pArray);
pLine.GetPenColor().SetColorIndex(VdColorCyan);
CvdAttrib attrib=blk.AddAttrib(FALSE, "ATTRIBTEST", "AttribTest:", "VDRAW_1",
COlePoint(0,0,0), 1.5);
attrib.GetPenColor().SetColorIndex(VdColorMagenta);
attrib.SetHorJustify(VdTextHorCenter);
attrib.SetVerJustify(VdTextVerBaseLine);
CvdInsert
ins=m_vdraw.GetActiveDocument().GetEntities().InsertBlock(COlePoint(0,0,0),
"Block1", 1, 1, 0);
ins.SetAttribValue("ATTRIBTEST", "VDRAW_1");
m_vdraw.Redraw();
XI. vdLayoutUUID
{E36786EC-5C7A-4CE4-85F8-A0A74F911088}
Miêu tả
Thuộc đối tượng VectorDraw Layout
Xem các thành viên trong vd Layout members
Bậc thừa kế
vdPrimary
Chú ý
Một layout được sử dụng để sắp xếp hoặc bố trí bản vẽ mô hình để vẽ. Một layout có
thể bao gồm một block tiêu đề, một hoặc nhiều viewport, và các chú giải. Khi bạn tạo
một layout, bạn có thể thiết kế cấu hình Viewport nổi để hình dung các chi tiết khác
nhau trong bản vẽ.
Một layout là một môi trường không gian giấy mà giả lập các trang giấy. Trong một
layout, bạn có thể tạo và xác định vị trí các đối tượng viewport và bạn có thể thêm block
tiêu đề hoặc hình học khác. Bạn có thể tạo đa layout trong một bản vẽ để hiển thị các
view khác nhau. Mỗi layout hiện thị bản vẽ như là nó sẽ vẽ hình trên một trang giấy.
Thông thường, khi bạn bắt đầu thiết kế một môi trường layout để vẽ, bạn làm các bước
sau:
Tạo một bản vẽ mô hình
Kích hoạt hoặc tạo một layout
Chèn một title block
Tạo các viewport nổi và định vị chúng trên layout
Thiết lập căn lề của viewport nổi
Vẽ layout.
Ví dụ
Thêm mới một Layout
Ví dụ trong Visual Basic 6:
Adding a new Layout
Dim lay1 As VDLAYOUT
Set lay1 = VDPro.ActiveDocument.LayOuts.Add("MYLAYOUT")
lay1.ViewCenter = Array(0, 0)
lay1.ViewSize = 100
Ví dụ trong Visual C++ 6.0:
CvdLayout lay=m_vdraw.GetActiveDocument().GetLayOuts().Add("MYLAYOUT");
lay.SetViewCenter(COlePoint(0,0,0));
lay.SetViewSize(12);
Thiết lập hoạt động cho layout đầu tiên trong list
Ví dụ trong Visual Basic 6:
Dim lay1 As vdLayout
Set lay1 = VDPro.ActiveDocument.LayOuts.Item(0)
Set VDPro.ActiveDocument.ActiveLayOut = lay1
'redraw the screen area
VDPro.Redraw
Ví dụ trong Visual C++ 6.0:
CvdLayout lay=m_vdraw.GetActiveDocument().GetLayOuts().GetItem(0);
m_vdraw.GetActiveDocument().SetRefActiveLayOut(lay);
Thiết lập layoput hoạt động vào không gian mô hình
Ví dụ trong Visual Basic 6:
Set VDPro.ActiveDocument.ActiveLayOut = VDPro.ActiveDocument.Model
Sample code in Visual C++ 6.0:
m_vdraw.GetActiveDocument().SetRefActiveLayOut(m_vdraw.GetActiveDocument().
GetModel());
Xóa các đối tượng Layout
Ví dụ trong Visual Basic 6:
Dim i As Integer
Dim numlayouts As Integer
Dim layout As vdLayout
numlayouts = VDPro.ActiveDocument.LayOuts.Count
For i = numlayouts - 1 To 0 Step -1
Set layout = VDPro.ActiveDocument.LayOuts.Item(i)
layout.Erase
'also you can remove as following
'VDPro.ActiveDocument.LayOuts.RemoveItem layout
Next i
'set active layout to model space
Set VDPro.ActiveDocument.ActiveLayOut = VDPro.ActiveDocument.Model
'redraw the screen area
VDPro.Redraw
Ví dụ trong Visual C++ 6.0:
CvdLayout layout;
while(m_vdraw.GetActiveDocument().GetLayOuts().GetStart().m_lpDispatch!=NULL)
{
layout=m_vdraw.GetActiveDocument().GetLayOuts().GetStart();
layout.Erase();
//m_vdraw.GetActiveDocument().GetLayOuts().RemoveItem(layout);
vdXPropertiesUUID
{73D6D8A2-1D69-4A59-A207-753853D8C1A8}
Miêu tả
Cho tập hợp VectorDraw vdXProperties
Xem các thành viên trong vdXproperties members
Chú ý
Tập hợp của vdXProperties trong một vdprimary. Xem trong classmodel
Để thêm một thành viên vào trong tập hợp, sử dụng phương pháp AddXProperty hoặc
AddItem
Để chọn một Xproperty xác định, sử dụng phương pháp Item
Để xóa một Xproperty xác định, sử dụng phương pháp RemoveItem tìm trong Block
Không giới hạn số lượng XProperties mà bạn có thể thêm vào bản vẽ.
Xem trong XProperty Type và AddXProperty method.
Chú ý: VectorDraw chỉ ghi 16Kbytes đầu tiên của mỗi thực thể của xproperties và chỉ
trong định dạng dwg/dxf.
Ví dụ một XProperties của kiểu XD_REAL sẽ định phần 16Bytes, một XD_INT 10
Bytes, và một XD_STRING 8Bytes cộng với số kí tự trong Bytes.
Ví dụ
Xem trong AddXProperty
vdXPropertyUUID
{4560384C-2B43-4621-A02E-F47DB7C59374}
Miêu tả
Cho tập hợp VectorDraw vdXProperty
Xem các thành viên trong vdXproperty members
Chú ý
vdXProperty là một đối tượng đơn giản mà bạn có thể thêm vào trong tập hợp
vdXProperties.
Bây giờ, bạn có thể thêm nhiều Xproperties bạn muốn vào một thực thể xác định sau đó
ghi lại bản vẽ.
Sử dụng chúng để tạo một đối tượng mở rộng của bạn.
Có 5 kiểu cho XProperties : Chuỗi, điểm, Số thực, long, và Handle.
Giá trị của XProperty có thể là kiểu động. Như thế có nghĩa là giá trị đó sẽ tự động thay
đổi khi thực thể thay đổi ( ví dụ căn lề, di chuyển…)
Xem trong AddXProperty method.
Chú ý: VectorDraw chỉ ghi 16Kbytes đầu của XProperties.
Ví dụ một XProperties của kiểu XD_REAL sẽ được 16Bytes, một XD_INT 10 Bytes,
và một XD_STRING 8Bytes cộng thêm số chữ trong các Bytes.
Ví dụ
Thêm một văn bản vào bản vẽ. Thêm hai XProperties kểu string và một integer
XProperty. Lọc XProperties và tạo một nhóm của Xproperties có giá trị bằng "JIM".
Tạo mới một Xproperty và lọc lại lần nữa XProperties với tiêu chuẩn khác.
Ví dụ trong Visual Basic 6:
Dim oneText As vdText
Dim FilterJim As vdXProperties
Dim FilterStavros As vdXProperties
Dim oneXData As vdXProperty
'Add a text
Set oneText = VDPro.ActiveDocument.Entities.AddText("just a text", Array(0, 0), 10)
'Add a XProperty with name JIM
oneText.XProperties.AddXProperty "JIM", 1000, "just a text"
'Add another XProperty with name JIM
oneText.XProperties.AddXProperty "JIM", 1000, "another text"
'Add another XProperty with name JIM but type as integer
oneText.XProperties.AddXProperty "JIM", 1071, 4
'Add a XProperty with name STAVROS
oneText.XProperties.AddXProperty "STAVROS", 1000, "another text also"
'Get all XProperties with name "JIM"
Set FilterJim = oneText.XProperties.GetFilterData("JIM")
For Each oneXData In FilterJim
Debug.Print oneXData.Name, oneXData.Type, oneXData.Value
Next
'Create a new XProperty
Set oneXData = VDPro.CreateInstance(OBJ_XPROPERTY)
'Set the data of XProperty
oneXData.Name = "STAVROS"
oneXData.Type = 1071
oneXData.Value = "Direct add"
'Add it to XProperties collection of oneText
oneText.XProperties.AddItem oneXData
'Get all XProperties with name "STAVROS"
Set FilterStavros = oneText.XProperties.GetFilterData("STAVROS")
For Each oneXData In FilterStavros
Debug.Print oneXData.Name, oneXData.Type, oneXData.Value
Next
Ví dụ trong Visual C++ 6.0:
//Add a text
CvdText txt=m_vdraw.GetActiveDocument().GetEntities().AddText("just a
text",COlePoint(0,0,0),2);
//Add a XProperty with name JIM
txt.GetXProperties().AddXProperty("JIM",1000,COleString("just a text"));
//Add another XProperty with name JIM
txt.GetXProperties().AddXProperty("JIM",1000,COleString("another text"));
//Add another XProperty with name JIM but type as integer
txt.GetXProperties().AddXProperty("JIM",1071,COleInt(4));
//Add a XProperty with name STAVROS
txt.GetXProperties().AddXProperty("STAVROS",1000,COleString("another
text also"));
int i;
CString s;
char buffer[200];
CString xStrValue;
int xIntValue;
//Get all XProperties with name "JIM"
CvdXProperties filterJim=txt.GetXProperties().GetFilterData("JIM");
for(i=0;i<filterJim.GetCount();i++){
s=filterJim.GetItem(i).GetName();
//check if data is int or string
if(filterJim.GetItem(i).GetValue().vt==8){
sprintf(buffer," %d ",filterJim.GetItem(i).GetType());
xStrValue=filterJim.GetItem(i).GetValue().bstrVal;
s+=buffer;
s+=xStrValue;
}
else if(filterJim.GetItem(i).GetValue().vt==3){
sprintf(buffer," %d ",filterJim.GetItem(i).GetType());
s+=buffer;
xIntValue=filterJim.GetItem(i).GetValue().intVal;
sprintf(buffer," %d ",xIntValue);
s+=buffer;
}
AfxMessageBox(s);
}
//Create a new XProperty
CvdXProperty oneXData=m_vdraw.CreateInstance(1);
//Set the data of XProperty
oneXData.SetName("STAVROS");
oneXData.SetType(1000);
oneXData.SetValue(COleString("direct add"));
//Add it to XProperties collection of oneText
txt.GetXProperties().AddItem(oneXData);
//Get all XProperties with name "STAVROS"
CvdXProperties
filterStavros=txt.GetXProperties().GetFilterData("STAVROS");
for(i=0;i<filterStavros.GetCount();i++){
s=filterStavros.GetItem(i).GetName();
//check if data is int or string
if(filterStavros.GetItem(i).GetValue().vt==8){
sprintf(buffer," %d ",filterStavros.GetItem(i).GetType());
xStrValue=filterStavros.GetItem(i).GetValue().bstrVal;
s+=buffer;
s+=xStrValue;
}
else if(filterStavros.GetItem(i).GetValue().vt==3){
sprintf(buffer," %d ",filterStavros.GetItem(i).GetType());
s+=buffer;
xIntValue=filterStavros.GetItem(i).GetValue().intVal;
sprintf(buffer," %d ",xIntValue);
s+=buffer;
}
AfxMessageBox(s);
}
vdLightUUID
{071B1C2C-A811-43D3-AB27-FB1F83CA23F0}
Miêu tả
Cho đối tượng VectorDraw Light
Xem các thành viên trong vdLight members
Chú ý
Là một đối tượng Light
Để sử dụng light bạn phải sử dụng thuộc tính vdLight vdLight Members.
Ví dụ
Tạo một hình nón và thêm vào đó một đối tượng light vào trong tài liệu. Xác định các
thuộc tính của light và hiển thị đoạn trả lại với các giá trị khác nhau của thuộc tính bao
quanh.
Ví dụ trong Visual Basic 6:
Dim myLight1 As vdLight
Dim counterR, counterG, counterB As Double
VDPro.CommandAction.CmdCone Array(0#, 0#, 0#), 4#, 2#, 3#, 20
Set myLight1 = VDPro.ActiveDocument.Lights.FindName("MYLIGHT1")
If myLight1 Is Nothing Then
Set myLight1 = VDPro.ActiveDocument.Lights.Add("MYLIGHT1")
End If
myLight1.Ambient = Array(0#, 0#, 0#, 0#)
myLight1.Diffuse = Array(1#, 1#, 1#, 1#)
myLight1.EnableLight = True
myLight1.Name = "MYLIGHT1new"
myLight1.Position = Array(0#, 0#, -1#)
myLight1.Specular = Array(0#, 0#, 0#, 0#)
myLight1.Spotcutoff = 120
myLight1.Spotdirection = Array(0, 0, -1)
myLight1.Spotexponent = 0
counterR = 0
counterG = 0
counterB = 0
While counterG < 0.99
myLight1.Ambient = Array(counterR, counterG, counterB, 0#)
VDPro.CommandAction.View3D "RENDER"
If counterR < 0.99 Then
counterR = counterR + 0.01
Else
If counterG < 0.99 Then
counterG = counterG + 0.01
End If
End If
If counterG > 0.99 Then
counterR = 0#
End If
Wend
Ví dụ trong Visual C++ 6.0:
double counterR, counterG, counterB;
m_vdraw.GetCommandAction().CmdCone(COlePoint(0,0,0),COleDouble(4),COleDou
ble(2),COleInt(3),COleInt(20));
CvdLight
mylight1=m_vdraw.GetActiveDocument().GetLights().FindName("MYLIGHT1");
if( mylight1.m_lpDispatch ==NULL){
mylight1=m_vdraw.GetActiveDocument().GetLights().Add("MYLIGHT1");
}
COleDoubleArray darray;
darray.AddValue(0);
darray.AddValue(0);
darray.AddValue(0);
darray.AddValue(0);
mylight1.SetAmbient(darray);
darray.RemoveAll();
darray.AddValue(1);
darray.AddValue(1);
darray.AddValue(1);
darray.AddValue(1);
mylight1.SetDiffuse(darray);
mylight1.SetEnableLight(TRUE);
mylight1.SetName("MYLIGHT1new");
mylight1.SetPosition(COlePoint(0,0,-1));
darray.RemoveAll();
darray.AddValue(0);
darray.AddValue(0);
darray.AddValue(0);
darray.AddValue(0);
mylight1.SetSpecular(darray);
mylight1.SetSpotcutoff(120);
mylight1.SetSpotdirection(COlePoint(0,0,-1));
mylight1.SetSpotexponent(0);
counterR= counterG= counterB=0;
while(counterG < 0.99){
darray.RemoveAll();
darray.AddValue(counterR);
darray.AddValue(counterG);
darray.AddValue(counterB);
darray.AddValue(0);
mylight1.SetAmbient(darray);
m_vdraw.GetCommandAction().View3D(COleString("RENDER"));
if(counterR < 0.99){
counterR+=0.01;
}
else {
if(counterG < 0.99){
counterG+=0.01;
}
}
if(counterG > 0.99){
counterR = 0;
}
}
vdLightsUUID
{3909DFC0-F523-441B-B90C-C75B35F43A34}
Miêu tả
Cho tập hợp VectorDraw Lights
Xem các thành viên trong vdLight s members
Chú ý
Đây là một tập hợp các Light.
Bạn có thể thêm nhiều light bạn muốn nhưng chỉ có thể dùng 8 light bao gồm cả Default
Light.
Ví dụ
Xem vi dụ trong vdLight cho V.B> 6.0
vdTextstylesUUID
{B6902951-A90C-4FAE-8E22-28F598AB3B65}
Miêu tả
Cho tập hợp VectorDraw Textstyles
Xem các thành viên trong vd Textstyles members
Chú ý
Là tập hợp của tất cả các kiểu văn bản trong bản vẽ
Để thêm một thành viên mới vào trong tập hợp, sử dụng hàm Add.
Để chọn một kiểu văn bản sử dụng hàm Item
Để xóa một kiểu văn bản, sử dụng hàm RemoveItem
Không có giới hạn số lượng kiểu văn bản mà bạn có thể tạo trong bản vẽ.
Tuy nhiên, chỉ có một trường hợp của TextStyles Collection.
TextStyles Collection xác định trước cho mỗi bản vẽ.
Không thể xóa được kiểu chữ mặc định có tên "STANDARD"
vdDimstylesUUID
{689810C2-FCE0-4D08-A013-A0D36F220A89}
Miêu tả
Cho tập hợp VectorDraw Dimstyles
Xem các thành viên trong vd Dimstyles members
Chú ý
Là tập hợp tất cả các kiểu dimension (xem trong vdDimstyle ) đang trong bản vẽ.
Để thêm một thành viên vào trong tập hợp sử dụng hàm Add .
Để chọn một kiểu dimension sử dụng hàm Item .
Để xóa một dimension sử dụng hàm Erase được tìm thấy.
Không giới hạn số lượng kiểu dimension bạn có thể tạo trong bản vẽ.
Tuy nhiên chỉ có một tập hợp DimStyles Collection.
Không thể di chuyển mặc định Dimstyle có tên "STANDARD".
vdLayersUUID
{EC4C5709-B376-4B97-AAA5-57C7C75F2291}
Miêu tả
Cho tập hợp VectorDraw Layers
Xem các thành viên trong vd Layers members
Chú ý
Là tập hợp tất cả các layer đang trong bản vẽ.
Để thêm một thành viên vào trong tập hợp sử dụng hàm Add .
Để chọn một layer sử dụng hàm Item.
Để xóa một layer sử dụng hàm Erase được tìm thấy trong Layer.
Không giới hạn số lượng layers bạn có thể tạo trong bản vẽ.
Tuy nhiên chỉ có một tập hợp Layers Collection.
vdDocumentUUID
{6D71E192-546B-4369-811F-4A2EC9429837}
Miêu tả
Cho tập hợp VectorDraw Document
Xem các thành viên trong vd Document members
Chú ý
Là tài liệu cho phiên.
Tài liệu có thể được truy cập sử dụng thuộc tính ActiveDocument.
Khi VectorDraw Control hoạt động với chỉ một tài liệu tại một thời điểm và tài liệu đó
có mặt trong cơ sở dữ liệu, tài liệu đó có thể được coi là cơ sở dữ liệu hiện tại cũng như
tài liệu hiện tại.
Đối tượng xác định trong bản vẽ mà thiết lập định dạng, vị trí hoặc kiểu cho mỗi đối
tượng mới sắp được thêm vào trong bản vẽ sẽ được kế thừa.
Những đối tượng này bao gồm các kiểu văn bản, block, thực thể, tập hợp được chọn và
các layers.
Một bản vẽ có thể chứa nhiều kiểu đối tượng trên, nhưng chỉ một đối tượng có thể hoạt
động trong một thời điểm
Để tạo hoặc mở tài liệu, sử dụng hàm New hoặc Open
vdBlocksUUID
{9A03773E-25EE-487F-9060-FFF0845BD42F}
Miêu tả
Cho tập hợp VectorDraw Blocks
Xem các thành viên trong vdBlocks members
Chú ý
Là tập hợp tất cả các block đang trong bản vẽ.
Để thêm một block vào trong tập hợp sử dụng hàm Add .
Để chọn một block sử dụng hàm Item.
Để xóa một block sử dụng hàm RemoveItem.
Không giới hạn số lượng block được tạo vào trong bản vẽ. Tuy nhiên chỉ có một
instance trong Blocks Collection. Đối tượng Blocks Collection object xác định trước
cho mỗi bản vẽ.
Bạn có thể tạo nhiều quan hệ đến Blocks Collection sử dụng thuộc tính Blocks.
Khi đã áp dụng xong với một đối tượng, mối quan hệ sẽ bị xóa một các tự động.
vdEntitiesUUID
{4E200DCE-88E8-4856-8D10-B9686B13B352}
Miêu tả
Cho tập hợp VectorDraw Entities
Xem các thành viên trong vdEntities members
Chú ý
Là tập hợp tất cả các đối tượng có thể vẽ được trong bản vẽ.
vdPrintUUID
{F039E90C-1088-4A01-A9B2-4470C3251002}
Miêu tả
Cho tập hợp VectorDraw Printer
Xem các thành viên trong vdPrint members
Chú ý
Đây là một đối tượng để xử lí việc Xem trước hoặc in của một bản vẽ
Khi mô hình hình phối cảnh luôn in sự hiển thị, bạn không thể điều khiển biến
PrintExtends và PrintWindow .
vdSelectionsUUID
{9431B903-FF11-457F-B9A4-3EDC7FB48374}
Miêu tả
Cho tập hợp VectorDraw Selections
Xem các thành viên trong vdSelections members
Chú ý
Là tập hợp tất cả các selection đang trong bản vẽ.
Để thêm một thành viên vào trong tập hợp sử dụng hàm Add .
Để chọn một tập hợp selection sử dụng hàm Item.
Để xóa một tập hợp selection sử dụng hàm Delete được tìm thấy trong SelectionObject.
Không giới hạn số lượng tập hợp selection được tạo vào trong bản vẽ.
Để mặc định đối tượng đầu tiên trong tập hợp này, hoặc tập hợp selection được chọn
trước đó, nó chỉ được cập nhật bằng các lệnh cmds
Ví dụ
Tạo một dòng, một đường tròn và một hình ellipse. Nhắc người sử dụng lựa chọn vài
con số để copy chúng. Hiển thị số của các đối tượng được chọn, xóa tất cả các mục từ
selection trước đó, và xác nhận rằng không có thực thể nào trong selection đó.
Ví dụ trong Visual Basic 6:
Dim myline As vdLine
Set myline = VDPro.ActiveDocument.Entities.AddLine(Array(0#, 0#, 0#), Array(5#,
5#, 0#))
myline.Invalidate
Dim mycircle As vdCircle
Set mycircle = VDPro.ActiveDocument.Entities.AddCircle(Array(1#, 0#, 0#), 2#)
mycircle.Invalidate
Dim myEllipse As vdEllipse
Set myEllipse = VDPro.ActiveDocument.Entities.AddEllipse(Array(0#, 0#, 0#), 3#, 1#)
myEllipse.Invalidate
MsgBox "Select objects to copy"
VDPro.CommandAction.CmdCopy "USER", "USER", "USER"
MsgBox "Selected objects : " & VDPro.ActiveDocument.Selections.Item(0).Count
VDPro.ActiveDocument.Selections.Item(0).RemoveAll
MsgBox "Objects in selection set: " &
VDPro.ActiveDocument.Selections.Item(0).Count
Ví dụ trong Visual C++ 6.0:
CvdLine
myLine=m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(0,0,0),COl
ePoint(5,5,0));
myLine.Invalidate();
CvdCircle
myCircle=m_vdraw.GetActiveDocument().GetEntities().AddCircle(COlePoint(1,0,0),2)
;
myCircle.Invalidate();
CvdEllipse
ell=m_vdraw.GetActiveDocument().GetEntities().AddEllipse(COlePoint(0,0,0),3,1);
m_vdraw.Redraw();
AfxMessageBox("Select objects to copy");
m_vdraw.GetCommandAction().CmdCopy(COleString("USER"),COleString("USER"),
COleString("USER"));
CString s;
s.Format("Selected objects :
%d",m_vdraw.GetActiveDocument().GetSelections().GetItem(0).GetCount());
AfxMessageBox(s);
m_vdraw.GetActiveDocument().GetSelections().GetItem(0).RemoveAll();
s.Empty();
s.Format("Objects in selection set:
%d",m_vdraw.GetActiveDocument().GetSelections().GetItem(0).GetCount());
AfxMessageBox(s);
vdSelectionUUID
{E77770C9-455F-46BB-AF9C-05C0B695701A}
Miêu tả
Cho tập hợp VectorDraw Selection
Xem các thành viên trong vdSelection members
Chú ý
Một hoặc nhiều đối tượng VectorDraw được xác định cho việc xử lí như một đơn vị đơn
Để xóa một tập hợp selection, hoặc xóa các mục trong tập hợp selection, sử dụng một
trong các phương pháp sau:
RemoveAll : Phương pháp RemoveAll sẽ xóa hết toàn bộ nội dung tập hợp
selection
Tập hợp selection sẽ vẫn tồn tại nhưng không chứa một mục gì hết.
Mục tồn tại trước đó trong selection sẽ vẫn tồn tại, nhưng không còn trong tập
hợp selection nữa.
RemoveItem : Phương pháp RemoveItem sẽ di chuyển các mục trong tập hợp
selection.
Mục bị di chuyển đi sẽ vẫn tồn tại, nhưng không còn trong tập hợp selection nữa
ClearAll : Phương pháp ClearAll xóa tất cả mục tập hợp selection.
Tập hợp selection vẫn tồn tại, nhưng không chứa mục gì.
Di chuyển hoặc xóa toàn bộ mục từ nhóm hoặc tập hợp selection. Mục bị di
chuyển từ nhóm hoặc tập hợp selection phải được di chuyển trước đó từ tâph
hợp thực thể của tài liệu
Free : Phương pháp Free xóa toàn bộ tập hợp selection và tất cả mục trong tập
hợp selection.
Di chuyển tập hợp selection từ một SelectionSetList của tài liệu. Các mục của
tập hợp selection vẫn tồn tại trong bản vẽ, tập hợp selection cũng hoàn toàn
không tồn tại nữa.Sử dụng phương pháp này khi bạn không sử dụng tập hợp
selection nữa
Để tạo một tập hợp selection, dùng hàm Add . Bạn không thể chọn các thực thể mà
đang trong tầng bị khóa
Ví dụ
Tạo một dòng và di chuyển nó
Ví dụ trong Visual Basic 6:
Dim sel As vdSelection
VDPro.CommandAction.CmdLine Array(Array(0, 0), Array(1, 1))
Set sel = VDPro.ActiveDocument.Selections.Add("mysel")
sel.AddItem VDPro.ActiveDocument.Entities.Last
MsgBox "Press ok to move the line"
VDPro.CommandAction.CmdMove sel, Array(0, 0), Array(1, 1)
Ví dụ trong Visual C++ 6.0:
COlePointArray pArray;
pArray.Add(COlePoint(0,0,0));
pArray.Add(COlePoint(1,1,0));
m_vdraw.GetCommandAction().CmdLine(pArray);
CvdSelection sel=m_vdraw.GetActiveDocument().GetSelections().Add("mysel");
sel.AddItem(m_vdraw.GetActiveDocument().GetEntities().GetLast());
AfxMessageBox("Press ok to move the line");
m_vdraw.GetCommandAction().CmdMove(COleObject(sel),COlePoint(0,0,0),COlePoi
nt(1,1,0));
.
vdLayoutsUUID
{C36AC2B8-54CA-4A47-9373-34150FDD00B8}
Miêu tả
Cho tập hợp VectorDraw Layouts
Xem các thành viên trong vd Layout s members
Chú ý
Là tập hợp tất cả các layout đang trong bản vẽ.
Để thêm một thành viên vào trong tập hợp sử dụng hàm Add .
Để chọn một layout sử dụng hàm Item.
Để xóa một layout sử dụng hàm Erase.
Không giới hạn số lượng layout được tạo vào trong bản vẽ. Tuy nhiên chỉ có một
instance của tập hợp Layouts
vdCommandUUID
{1FE73755-A604-4127-9266-3AB000EA36AB}
Miêu tả
Cho tập hợp VectorDraw CommandAction
Xem các thành viên trong vd Command members
Chú ý
Là một đối tượng cơ bản của VectorDraw.
Nó được sử dụng khi bạn muốn chạy một lệnh trong ActiveDocument hoặc để người
dùng tác động lên bản vẽ.
Ví dụ khi bản muốn người dùng thêm một dòng bạn gọi hàm CmdLine hoặc khi bạn
muốn dừng bất cứ một việc gì, bạn gọi hàm Cancel .
Bạn cũng có thể thêm thực thể , nhưng chúng tôi khuyên bạn nên sử dụng hàm Add của
tập hợp thực thể.
Chú ý : Khi di chuyển qua coordinates họ phải luôn luôn trong Current Coord System
(CCS).
vdUtilityUUID
{1FABA0BC-9DB8-4D0F-8234-42DB91ADD2F5}
Miêu tả
Cho tập hợp VectorDraw Utility
Xem các thành viên trong vd Utility members
Chú ý
Đối tượng này là một tập hợp các chức năng mà chúng tôi phải phát triển để tạo cho
việc sử dụng của bạn dễ dàng hơn
vdSelectionClipsUUID
{C3D6519F-5D50-4A64-A37B-4D990A3B35CA}
Mô tả
Tập hợp VectorDraw Section Clipping
Dùng cho toàn bộ đối tượng được định nghĩa trong môđun này, xem phần
vdSectionClips members.
Chú ý:
Đối tượng này được sử dụng để cắt xén trong bản vẽ.
VectorDraw làm cho khoảng bị cắt bị ẩn đi trong bản vẽ. SectionClip xác định phía của
của bản vẽ sẽ được hiện rõ.
Phần hiện rõ sẽ được xác định trong vdSectionClip bằng cách xác định OriginPoint và
vector Direction. Hướng của vector đó sẽ xác định phần hiển thị. Vùng đối diện sẽ bị ẩn
đi.
Hướng mà OriginPoint xác định vùng cũng sẽ xác định vùng bị cắt. Giá trị của chúng
luôn trong World Coordinating System.
Đối tượng đa vdSectionClip sẽ chỉ ra vùng chung có thể nhìn thấy được. Nó cho phép
một cái nhìn trong suốt trong bản vẽ 3D bằng việc ẩn vùng đã xác định từ view.
Xem thêm trong tập hợp vdSectionClips
Hình vẽ
Ở ví dụ trên, vdSectionClip đầu tiên từ điểm 5,5,0 và trong hướng trục Y. OriginPoint là
5,5,0 và hướng 0,1,0.
Điểm vdSectionClip thứ hai có hướng đối diện với trục Y. Vì vậy hướng là 0,-1,0 và
OriginPoint là 5,15,0.
Ví dụ
Tạo một hình nón và 2 đối tượng vdSectionClip để làm ẩn 2 vùng của hình nón.
Ví dụ trong Visual Basic 6:
Dim myClip1, myClip2 As vdSectionClip
Dim Origin As vdxyz
Dim Direction As vdxyz
VDPro.CommandAction.CmdCone Array(0#, 0#, 0#), 4, 3, 2, 20
Set Origin = VDPro.CreateInstance(OBJ_XYZ)
Set Direction = VDPro.CreateInstance(OBJ_XYZ)
Origin.SetValueEx -3#, 0#, 0#
Direction.SetValueEx 1#, 0#, 0#
Set myClip1 = VDPro.ActiveDocument.ActiveLayOut.Sections.Add("MyClip1",
Origin, Direction, 1)
Set Origin = VDPro.CreateInstance(OBJ_XYZ)
Set Direction = VDPro.CreateInstance(OBJ_XYZ)
Origin.SetValueEx 3#, 0#, 0#
Direction.SetValueEx 1#, 0#, 0#
Set myClip2 = VDPro.ActiveDocument.ActiveLayOut.Sections.Add("MyClip2",
Origin, Direction, 1)
VDPro.CommandAction.View3D "RENDER"
VDPro.CommandAction.Zoom "E", 0, 0
VDPro.CommandAction.View3D "VROT"
Ví dụ trong Visual C++ 6.0:
CvdSectionClip clip1,clip2;
Cvdxyz origin,direction;
m_vdraw.GetCommandAction().CmdCone(COlePoint(0,0,0),COleDouble(4),COleDou
ble(2),COleInt(3),COleInt(20));
origin=m_vdraw.CreateInstance(OBJ_XYZ);
direction=m_vdraw.CreateInstance(OBJ_XYZ);
origin.SetValueEx(-3, 0, 0);
direction.SetValueEx(1, 0, 0);
clip1=m_vdraw.GetActiveDocument().GetActiveLayOut().GetSections().Add("myclip1
",origin,direction,1);
origin=m_vdraw.CreateInstance(OBJ_XYZ);
direction=m_vdraw.CreateInstance(OBJ_XYZ);
origin.SetValueEx(3, 0, 0);
direction.SetValueEx(1, 0, 0);
clip2=m_vdraw.GetActiveDocument().GetActiveLayOut().GetSections().Add("myclip2
",origin,direction,1);
m_vdraw.GetCommandAction().View3D(COleString("RENDER"));
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
m_vdraw.GetCommandAction().View3D(COleString("VROT"));
vdxyzUUID
{C7746EB2-7361-402D-B4C2-FBAE6FC4850D}
Mô tả
Cho đối tượng VectorDraw XYZ (Tọa độ và điểm)
Xem các thành viên trong vdxyz members.
Chú ý:
Đây là đối tượng cơ bản trong việc biểu diễn một điểm
Ví dụ:
Xem SetValueEx để làm ví dụ đơn giản trong V.B.6.0
vdmatrixMô tả
Cho đối tượng VectorDraw MATRIX
Xem các thành viên trong vdmatrix members.
Chú ý:
Một vdmatrix đại diện cho một ma trận 4X4 Matrix sử dụng cho phép biến đổi.
Phép biến đổi có thể: Xoay x, y, z, căn lề trong hướng x y và z và dịch chuyển hướngx,
y, z.
Thứ tự của những thông tin này có ý nghĩa. Thay đổi thứ tự thì kết quả sẽ thay đổi.
Ma trận có cấu trúc:
| M(0,0) M(0,1) M(0,2) M(0,3) | Giá trị khởi tạo : | 1 0 0 0 |
| M(1,0) M(1,1) M(1,2) M(1,3) | | 0 1 0 0 |
| M(2,0) M(2,1) M(2,2) M(2,3) | | 0 0 1 0 |
| M(3,0) M(3,1) M(3,2) M(3,3) | | 0 0 0 1 |
Khi biến đổi được thực hiện với matrận với giá trị mặc định hoặc khởi tạo thì đối tượng
không thay đổi
Ví dụ
Tạo một hộp có hình đa mặt và biến đổi mà trận, xoay trục x, y, z, di chuyển nó và cuối
cùng sắp xếp lại các mặt
Ví dụ trong Visual Basic 6:
Dim FinalMatrix As vdmatrix
Dim pi As Double
pi = 3.141592654
VDPro.CommandAction.View3D "VISW"
VDPro.CommandAction.CmdBox3d Array(0, 0), 9, 5, 1, 0
Dim box As vdPolyface
Set box = VDPro.ActiveDocument.Entities.Last
VDPro.ShowWCSAxis = UCSICON_Show_World
VDPro.Redraw
MsgBox "Rotate about x axis"
Set FinalMatrix = VDPro.CreateInstance(OBJ_MATRIX) 'Create the Matrix
FinalMatrix.RotateX pi / 2 'first rotate around X for 90 Degrees
box.Transformby FinalMatrix 'Apply the transformation
VDPro.Redraw
MsgBox "Rotate about y axis"
FinalMatrix.Init
FinalMatrix.RotateY -pi / 2
box.Transformby FinalMatrix
VDPro.Redraw
MsgBox "Rotate about z axis"
FinalMatrix.Init
FinalMatrix.RotateZ pi / 2
box.Transformby FinalMatrix 'Apply the transformation
VDPro.Redraw
MsgBox "Move"
FinalMatrix.Init
FinalMatrix.Translate 2, 0, 0
box.Transformby FinalMatrix 'Apply the transformation
VDPro.Redraw
MsgBox "Scale"
FinalMatrix.Init
FinalMatrix.ScaleMatrix 0.5, 0.5, 0.5
box.Transformby FinalMatrix 'Apply the transformation
VDPro.Redraw
Ví dụ trong Visual C++ 6.0:
Cvdmatrix finalmatrix;
double pi=3.141592654;
m_vdraw.SetShowWCSAxis(UCSICON_Show_World);
m_vdraw.GetCommandAction().View3D(COleString("VISW"));
m_vdraw.GetCommandAction().CmdBox3d(COlePoint(0,0,0),COleDouble(9),COleDo
uble(5),COleDouble(1),COleDouble(0));
CvdFigure mybox=m_vdraw.GetActiveDocument().GetEntities().GetLast();
m_vdraw.Redraw();
AfxMessageBox("Rotate about x axis");
finalmatrix=m_vdraw.CreateInstance(OBJ_MATRIX);
finalmatrix.RotateX(pi/2);
mybox.Transformby(finalmatrix);
m_vdraw.Redraw();
AfxMessageBox("Rotate about y axis");
finalmatrix.Init();
finalmatrix.RotateY(pi/2);
mybox.Transformby(finalmatrix);
m_vdraw.Redraw();
AfxMessageBox("Rotate about z axis");
finalmatrix.Init();
finalmatrix.RotateZ(pi/2);
mybox.Transformby(finalmatrix);
m_vdraw.Redraw();
AfxMessageBox("Move");
finalmatrix.Init();
finalmatrix.Translate(2,0,0);
mybox.Transformby(finalmatrix);
m_vdraw.Redraw();
AfxMessageBox("Scale");
finalmatrix.Init();
finalmatrix.ScaleMatrix(0.5,0.5,0.5);
mybox.Transformby(finalmatrix);
m_vdraw.Redraw();
vdSelectionClipsMô tả
Cho đối tượng VectorDraw Selection Clipping
Xem các thành viên trong vd SelectionClips members .
Chú ý:
Nó là tập hợp của các đối tượng vdSectionClip .
Tập hợp vdSectionClip là một thuộc tính của Layouts và viewport. Nó có thể không
giới hạn số lượng đối tượng nhưng chỉ 6 đối tượng có thể áp dụng cho tất cả các hiển
thị. Ví dụ trong một bản vẽ có nhiều hơn một viewports bạn có thể có 6 Section clips áp
dụng cho tất cả các và cho các Layout
Nếu nhiều hơn 6, thì cái đầu tiên trong 6 cái được hiển thị, còn những cái khác bị bỏ
qua.
vdSectionClip chỉ áp dụng cho 3 mô hình : 3DWIRE VdConstDrawMode(vdc_3D,
vdc_HIDE, vdc_SHADE, vdc_RENDER)
vdSectionClip chỉ tương thích với định dạng file VectorDraw (vdf/vdi/vdp).
Nếu mô hình có vdSectionClip áp dụng vào thì chúng cũng áp dụng trên Viewports.
Ví dụ
Ví dụ trong Visual Basic 6:
Dim SecClip As vdSectionClips
Dim Origin As vdxyz
Dim Direction As vdxyz
Dim Layout As vdLayout
VDPro.CommandAction.CmdSphere Array(0, 0, 0), 5, 9, 9 'Creation of a 3D object
Set Layout = VDPro.ActiveDocument.Model
Set SecClip = Layout.Sections
Set Origin = VDPro.CreateInstance(OBJ_XYZ)
Set Direction = VDPro.CreateInstance(OBJ_XYZ)
Origin.SetValueEx 0, 0, 0
Direction.SetValueEx 0, 1, 0
SecClip.Add "Clip1", Origin, Direction, 0
VDPro.CommandAction.Zoom "E", 0, 0
VDPro.CommandAction.View3D "SHADEON" ' The half sphere is shown
MsgBox "Press ok to display the viewport"
Dim MyViewPort As vdViewport
Set Layout = VDPro.ActiveDocument.LayOuts.Add("PAPER1")
Set MyViewPort = Layout.Entities.AddViewPort(Array(0, 0, 0), 20, 20)
MyViewPort.ViewSize = 12
MyViewPort.ViewCenter = Array(0, 0, 0)
MyViewPort.View3DMode = vdc_SHADE
Set Direction = VDPro.CreateInstance(OBJ_XYZ)
Origin.SetValueEx 0, 0, 0
Direction.SetValueEx 1, 0, 0
SecClip.Add "Clip2", Origin, Direction, 0
Set VDPro.ActiveDocument.ActiveLayOut = Layout
VDPro.CommandAction.Zoom "E", 0, 0 ' The quarter of sphere is shown in the
viewport
Ví dụ trong Visual C++ 6.0:
m_vdraw.GetCommandAction().CmdSphere(COlePoint(0.0,0.0,0.0),COleVariant(5.0),
COleVariant((long)15)
,COleVariant((long)15));
CvdLayout lay=m_vdraw.GetActiveDocument().GetModel();
CvdSectionClips secclip=lay.GetSections();
Cvdxyz origin=m_vdraw.CreateInstance(OBJ_XYZ);
Cvdxyz direction=m_vdraw.CreateInstance(OBJ_XYZ);
origin.SetValueEx(0, 0, 0);
direction.SetValueEx(0, 1, 0);
secclip.Add("Clip1", origin, direction, 0);
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
m_vdraw.GetCommandAction().View3D(COleString("SHADEON"));
AfxMessageBox("Press ok to display the viewport");
lay=m_vdraw.GetActiveDocument().GetLayOuts().Add("PAPER1");
CvdViewport vport=lay.GetEntities().AddViewPort(COlePoint(0,0,0),20,20);
vport.SetViewSize(12);
vport.SetViewCenter(COlePoint(0,0,0));
vport.SetView3DMode(vdc_SHADE);
secclip=vport.GetSections();
origin.SetValueEx(0, 0, 0);
direction.SetValueEx(1, 0, 0);
secclip.Add("Clip2", origin, direction, 0);
m_vdraw.GetActiveDocument().SetRefActiveLayOut(lay);
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
vdxyzlistMô tả
Cho tập hợp điểm VectorDraw XYZ
Xem các thành viên trong vd xyzlist members .
Chú ý:
Đây là một tập hợp các điểm. Kiểu của chúng là vdxyz
vdColorMô tả
Cho đối tượng VectorDraw Color
Xem các thành viên trong vd Color members .
Chú ý:
Đây là đối tượng màu. Để sử dụng màu, bạn phải sử dụng thuộc tính vdColor.
vdPaletteMô tả
Cho đối tượng VectorDraw Palette
Xem các thành viên trong vd Palette members .
Chú ý:
VectorDraw sử dụng bảng màu chuẩn độ dài 255. Tất cả các mục hiển thị giá trị
(R,G,B). Để lấy hoặc thay đổi những giá trị này sử dụng VdColorIndexToRGB hoặc
RGBToVdColorIndex.
Để mở bảng màu, sử dụng GetColorDlg.
Có thể xem trong palette.
vdRenderMô tả
Cho đối tượng VectorDraw Render
Xem các thành viên trong vd Render members .
Chú ý:
Vectordraw sử dụng cơ chế hoàn trả (Render engine). Một số thuộc tính và phương pháp
của cơ chế này được lấy ra thông qua vdRender . Thông thường, những sự kiện sau
được dùng:
Draw
DrawEntity
DrawAfterEntity
DrawAfter
DrawBackground
CommandActionDraw
VectorDraw hoàn trả toàn bộ trình diện trong nội dung thiết bị nhớ (bitmap nhớ). Sau đó
bitmap này sẽ được xem. Đối tượng hoàn trả mặc định này sẽ được quay trở về bằng
phương pháp hoàn trả từng phần.
Rất tiện ích để vẽ trong Low-Level mà không cần thêm các đối tượng hoạ tiết.
VectorDraw hoàn trả trong một thiết bị, thì có thể là một bitmap nhớ hoặc là một thiết bị
(hDC) thuộc phần mềm Window (hWnd).
Những thuộc tính cơ bản của đối tượng vdRender này mà có thể được chuyển từ D.U.
(những đơn vị hoạ tiết) sang Window-Pixels là:
Góc trái trên của thiết bị (Trái và Đỉnh trên trong các phần tử hình ảnh)
Độ rộng trong các phần tử hình ảnh
Chiều cao trong các phần tử hình ảnh
Trung tâm xem (View Center) (GetViewCenter) trong D.U. của phần xem hiện
thời, điểm 2D
Kích cỡ xem (View Size) chiều cao của hình xem trong D.U. được coi như là
phần phóng đại.
Việc chuyển đổi đối tượng vdMatrix thường được chuyển toạ độ của đối tượng
từ World CS sang hệ thống toạ độ xem hiện thời.
vdHatchPattenMô tả
Cho đối tượng VectorDraw Hatchpatten Definition
Xem các thành viên trong vd Hatchpatten members .
Chú giải
Tập hợp tất cả đối tượng của HatchPatterns trong hoạ tiết hoạt động. Để thêm một đối
tượng mới vào tập hợp, sử dụng phương pháp Add. Để chọn một đối tượng
HatchPattern cụ thể, sử dụng thuộc tính Item. Để tìm một đối tượng cụ thể bằng tên, sử
dụng thuộc tính FindName.
Ví dụ
Tạo một cửa mới và thêm nó và tập hợp các cửa tài liệu. Cửa mới chứa 2 đường vuông
góc. Tạo một hình chữ nhật và áp dụng mẫu cửa này vào đó. Cuối cùng, trình diễn số
định nghĩa dòng trong mẫu cửa ấy.
Ví dụ trong Visual Basic 6:
Dim myhatch As vdHatchPattern
Dim myRect As vdRect
Set myhatch = VDPro.ActiveDocument.HatchPatterns.Add("myhatch")
myhatch.RemoveAllLines
myhatch.AddLineDefinition 0, 0, 0, 0, 5, Array(3, -3)
myhatch.AddLineDefinition VDPro.Utility.geomPI / 2, 0, 10, 0, 6, Array(3, -2)
VDPro.CommandAction.CmdRect Array(-20, -20), Array(20, 20)
Set myRect = VDPro.ActiveDocument.Entities.Last
myRect.FillMode = VdFillModeUnknown
myRect.hatchBlock = "myhatch"
myRect.hatchScale = 1
myRect.Update
myRect.Invalidate
VDPro.CommandAction.Zoom "E", 0, 0
MsgBox "This hatch pattern is composed by" & myhatch.NumLines & " lines"
Ví dụ trong Visual C++ 6.0:
CvdHatchPattern
myHatch=m_vdraw.GetActiveDocument().GetHatchPatterns().Add("myhatch");
myHatch.RemoveAllLines();
COleDoubleArray dash;
dash.AddValue(3);
dash.AddValue(-3);
COleDoubleArray dash2;
dash2.AddValue(3);
dash2.AddValue(-3);
myHatch.AddLineDefinition(0, 0, 0, 0, 5,dash);
myHatch.AddLineDefinition(m_vdraw.GetUtility().GetGeomPI()/2, 0, 10, 0,
6,dash2);
m_vdraw.GetCommandAction().CmdRect(COlePoint(-20,-20),COlePoint(20,20));
CvdRect myRect=m_vdraw.GetActiveDocument().GetEntities().GetLast();
myRect.SetFillMode(12);
myRect.SetHatchBlock("myhatch");
myRect.SetHatchScale(1);
myRect.Update();
myRect.Invalidate();
m_vdraw.GetCommandAction().Zoom(COleString("E"),COleString(),COleString());
CString s;
s.Format("This hatch pattern is composed by %d lines", myHatch.GetNumLines());
AfxMessageBox(s);
vdImagesMô tả
Cho tập hợp đối tượng VectorDraw Image
Xem các thành viên trong vd Image members .
Chú giải
Là tập hợp tất cả hình ảnh trong phần Hoạ tiết động. Để thêm một đối tượng mới vào
tập hợp, sử dụng phương pháp Add. Để chọn một Image cụ thể, sử dụng thuộc tính
Item. Để tìm một Image cụ thể bằng tên, sử dụng thuộc tính FindName.
vdImageDefMô tả
Cho đối tượng VectorDraw Image Definition
Xem các thành viên trong vd ImageDef members
Chú ý
Đối tượng này được dùng để cung cấp cho người sử dụng những chức năng để xem
hoặc thay đổi một số thuộc tính của hình ảnh.
Ví dụ
Hỗ trợ người sử dụng chèn một hình ảnh, và lấy ra dưới dạng file có đuôi .gif.
Ví dụ trong Visual Basic 6:
Dim imdef As vdImageDef
Dim im As vdImage
VDPro.CommandAction.CmdImage "", "USER"
Set im = VDPro.ActiveDocument.Entities.Last
Set imdef = VDPro.ActiveDocument.Images.FindName(im.ImageFileName)
imdef.ExportToFile App.Path + "\mygif.gif"
MsgBox "height " + CStr(imdef.Height) + ", width " + CStr(imdef.Width) + ", colors
" + CStr(imdef.NumColors) + ","
Ví dụ trong Visual C++ 6.0:
m_vdraw.GetCommandAction().CmdImage("",COleString("USER"));
CvdImage img=m_vdraw.GetActiveDocument().GetEntities().GetLast();
CvdImageDef
imgdef=m_vdraw.GetActiveDocument().GetImages().FindName(img.GetImageFileNa
me());
imgdef.ExportToFile("C:\\mygif.gif");
CString s;
s.Format("height %d , width %d , colors
%d",imgdef.GetHeight(),imgdef.GetWidth(),imgdef.GetNumColors());
AfxMessageBox(s);
vdLineTypesMô tả
Đối tượng tập hợp VectorDraw Line types.
Dùng cho toàn bộ đối tượng được định nghĩa trong môđun này, xem phần vdLineTypes
members.
Chú ý
Là tập hợp các đối tượng kiểu dòng trong phần hoạ tiết động. Để thêm một đối tượng
mới vào tập hợp, sử dụng phương pháp Add. Để chọn một Linetype cụ thể, sử dụng
thuộc tính Item. Để tìm một Linetype cụ thể bằng tên, sử dụng thuộc tính FindName.
Chú ý: Có thể có tối đa 512 định nghĩa của kiểu dòng (trong đó có 24 kiểu dòng mặc
định trong VectorDraw).
vdLineTypeMô tả
Cho đối tượng VectorDraw Line type Definition
Dùng cho toàn bộ đối tượng được định nghĩa trong môđun này, xem phần vdLineType
members.
Chú ý
Đối tượng này được dùng để tạo mới hoặc thay đổi một linetypes đã tồn tại hoặc lấy
thông tin về linetypes.
Chú ý: Có thể có tối đa 512 định nghĩa của kiểu dòng (trong đó có 24 kiểu dòng mặc
định trong VectorDraw).
Lấy thêm thông tin trong vdLineType members.
Example
Với ví dụ này bạn có thể học được cách thêm kiểu dòng mới trong tập hợp linetypes của
bản vẽ và sau đó thêm một dòng bằng cách chọn một linetype. Tạo mới một linetype
bằng cách copy thuộc tính từ linetype đã tồn tại. Thêm nhận xét cho kiểu dòng được tạo
và vẽ một dòng kiểu dòng đó . Cuối cùng hiển thị linetypes trong một hộp thoại
Ví dụ trong Visual Basic 6:
Dim lt As vdLineType
Dim l As vdLine
Set lt = VDPro.ActiveDocument.LineTypes.Add("giannis")
lt.NumDashes = 5 ' Set the number of dashes
lt.SetDashAt 0, 1 'Set Dashes length and type
lt.SetDashAt 1, -1
lt.SetDashAt 2, 0
lt.SetDashAt 3, -1
lt.SetDashAt 4, 1
VDPro.ActiveDocument.LineTypeScale = 1
lt.Comments = "giannis ___._____.__._______" 'Set Comments
Set l = VDPro.ActiveDocument.Entities.AddLine(Array(0, 0), Array(15, 15))
l.PenStyle = VDPro.Utility.GetLineTypeDlg(2, False) 'Display the dialog to choose
linetype
l.Invalidate
l.Update
Ví dụ trong Visual C++ 6.0:
CvdLineType lt=m_vdraw.GetActiveDocument().GetLineTypes().Add("giannis");
lt.SetNumDashes(5);
lt.SetDashAt(0, 1 );
lt.SetDashAt(1, -1);
lt.SetDashAt(2, 0);
lt.SetDashAt(3, -1);
lt.SetDashAt(4, 1 );
lt.SetComments("giannis ___._____.__._______");
m_vdraw.GetActiveDocument().SetLineTypeScale(1);
CvdLine
l=m_vdraw.GetActiveDocument().GetEntities().AddLine(COlePoint(0,0,0),COlePoint(
15,15,0));
l.SetPenStyle(m_vdraw.GetUtility().GetLineTypeDlg(2,FALSE));
l.Invalidate();
l.Update();
vdHatchPatternsMô tả
Đối tượng tập hợp VectorDraw Hatch patterns.
Dùng cho toàn bộ đối tượng được định nghĩa trong môđun này, xem phần
vdHatchPatterns members.
Chú ý
Tập hợp tất cả đối tượng Linetypes trong phần hoạ tiết động. Để thêm một đối tượng
mới vào tập hợp, sử dụng phương pháp Add. Để chọn một Linetype cụ thể, sử dụng
thuộc tính Item. Để tìm một Linetype cụ thể bằng tên, sử dụng thuộc tính FindName.
vdActionMô tả
Đối tượng VectorDraw Actions.
Dùng cho toàn bộ đối tượng được định nghĩa trong môđun này, xem phần vdActions
members.
Chú ý
Đối tượng vdActions tương tự như thuộc tính của ActionValidates.
Mỗi thay đổi giá trị ActionValidates cũng làm thay đổi một hoặc nhiều thuộc tính của
các đối tượng vdActions. Mặt khác, mỗi thay đổi trong bất cứ thành viên nào của
vdAction (thuộc tính) cũng làm thay đổi giá trị thuộc tính của ActionValidates
Giá trị mặc định của tất cả các vdActions members là FALSE
vdDataObjectMô tả
VectorDraw DataObject
Dùng cho toàn bộ đối tượng được định nghĩa trong môđun này, xem phần vdDataObject
members.
Chú ý
Đối tượng này được sử dụng cho những trường hợp drag-drop. Là một tập hợp biến.
Mỗi biến là một dạng thức bộ nhớ tạm thời khác nhau. VectorDraw hỗ trợ những định
dạng sau:
1)CF_TEXT=1, kiểu này bao gồm một chuỗi biến.
2)CF_HDROP=15, kiểu này là một chuỗi biến của các chuỗi, mỗi chuỗi là một tên file.
3)Một kiểu xác định bởi người sử dụng mà xuất phát từ hàm API
RegisterClipboardFormat . Và giá trị của nó nằm giữa c000 h và ffff h. Để có được định
dạng Vector Draw Clipboard Format mặc định thì sử dụng thuộc tính của
VdrawClipboardFormat.
Ví dụ
Cho một ví dụ đơn giản trong V.B. 6.0 xem phần DoDragDrop
I./ Giới thiệu về XDDraw
XDDraw là một công cụ được thiết kế phục vụ việc vẽ các đối tượng cơ bản trong xây dựng. Nó là
một activeX thực hiện việc vẽ, chỉnh sửa các đường thẳng, đường tròn, cung tròn. Do đặc thù là một
công cụ phát triển nên người lập trình có thể tuỳ biến sử dụng một cách dễ dàng để có thể tạo ra
được các sản phẩm vẽ trong xây dựng theo ý mình.
Các chức năng:
1. Vẽ:
- Các loại đối tượng: đường thẳng, đường tròn, cung tròn.
- Edit.
- Chọn màu sắc.
2. Lựa chọn:
- Việc lựa chọn các đối tượng được thực hiện dễ dàng nhờ chức năng Snap.
- Ngoài ra chương trình được xây dựng giải thuật nhằm tối ưu hoá việc lựa chọn các đối
tượng hình vẽ, với giải thuật này thì việc lựa chọn các đối tượng không phải được tìm kiếm
trong toàn bộ miền không gian hình vẽ mà đã được giới hạn trong những vùng không gian
đã được chia nhỏ, do đó việc xác định vị trí của các đối tượng là tối ưu vì vậy đảm bảo hiệu
năng của chương trình.
3. Di chuyển bản vẽ:
- Pan: sử dụng để di chuyển vị trí bản vẽ.
II./ Ưu nhược điểm của chương trình.
1. Ưu điểm:
Như chúng ta đã biết thì với mỗi bản vẽ thường xuyên xuất hiện nhu cầu cần phải xác định vị trí
của các đối tượng hình vẽ ở trên bản vẽ này, ví dụ khi ta cần lựa chọn một đối tượng hình vẽ hay phổ
biến nhất là khi Snap hình vẽ. Theo như cách thông thường để có thể xác định được vị trí của các đối
tượng hình vẽ này chúng ta sẽ duyệt qua toàn bộ các đối tượng hình vẽ dựa theo toạ độ xác định của
chúng trong mặt phẳng bản vẽ. Cách làm này có đặc điểm là đơn giản, dễ cài đặt và vẫn có thể hoạt
động được nếu như số lượng các đối tượng hình vẽ là nhỏ.
Tuy nhiên thử hình dung trong trường hợp bản vẽ của chúng ta có hàng trăm đối tượng hình vẽ
khi đó mỗi khi muốn thực hiện một công việc đơn giản ví dụ như Snap một hình vẽ nào đó, ít nhất
chúng ta cũng phải duyệt qua dữ liệu toạ độ của hàng trăm đối tượng hình vẽ này rồi từ đó mới có
các thao tác xử lý chúng. Như vậy hiệu năng của chương trình sẽ giảm đi rất nhiều vì phải mất thời
gian xử lý và do đó làm chậm chương trình gây khó khăn cho người sử dụng.
Xuất phát từ yêu cầu đó mà chương trình khi được thiết kế đã rất chú trọng đến việc cài đặt các
giải thuật để nâng cao hiệu năng của chương trình. Bằng việc chia toàn bộ mặt phẳng bản vẽ thành
các miền không gian con, các đối tượng hình vẽ khi đó sẽ được gán cho một vùng không gian nhỏ,
việc xác định ví trí của các đối tượng hình vẽ này bây giờ không phải là duyệt qua toàn bộ dữ liệu
toạ độ của tất cả các đối tượng hình vẽ trong mặt phẳng không gian chứa bản vẽ nữa mà đã được
giới hạn trong một vùng nhỏ và việc xác định nó sẽ được thực hiện bằng một giải thuật tìm kiếm cây.
Chính vì vậy mà việc xác định một đối tượng hình vẽ sẽ không gây ra sự chậm trễ trong khâu xử lý
như gặp phải ở trên.
Để có thể hình dung ra rõ hơn sự khác biệt trong trường hợp này chúng ta có thể xem xét việc
tìm kiếm một khoá trên một dãy khoá gồm 1000 phần tử. Với cách tìm kiếm thông thường, ta sẽ
duyệt qua cả 1000 khoá này nhưng với phép tìm kiếm nhị phân chúng ta chỉ cần duyệt qua 10 phần
từ là có thể xác định được khoá cần tìm.
Chính vì vậy mà có thể khẳng định chương trình đã được cài đặt giải thuật giúp giải quyết cơ
bản vấn đề tìm kiếm đối tượng hình vẽ và đây chính là ưu điểm rõ rệt của chương trình.
2. Nhược điểm
Do chương trình mới được phát triển nên hiện tại mới chỉ xây dựng được các tính năng vẽ cơ
bản nhất, còn nhiều tính năng chưa được xây dựng xong và sẽ được phát triển trong các phiên bản
sau.
III./ Cách sử dụng:
Sau khi activeX đã được đưa vào thì người sử dụng chỉ việc thao tác chuột trên miền không gian
chứa activeX này là có thể thực hiện được các thao tác vẽ.
IV./ Các hàm, thuộc tính của ActiveX.
1. Các hàm:
Hàm khai báo Miêu tả Các tham số
SetBkColor(long red, long
green, long blue)
Đặt màu nền cho vùng
bản vẽ
red, green, blue: 3 thành
phần RGB của màu sắc
SetColor(long red, long
green, long blue)
Đặt màu cho đường vẽ red, green, blue: 3 thành
phần RGB của màu sắc
SetMouseAction(long
action)
Thiết lập hành động di
chuyển chuột
action = 1: Vẽ
action = 2: Pan
AddLine(long x1, long y1,
long x2, long y2)
Thêm đường thẳng x1, y1: toạ độ điểm thứ
nhất
x2, y2: toạ độ điểm thứ
hai
AddCircle(long x1, long
y1, long radius)
Thêm đường tròn x1, y1: toạ độ tâm
radius: bán kính đường
tròn
ShowVungBam(boolean
bShow)
Hiển thị đường chia nhỏ
vùng không gian vẽ
bShow = True: Enable
bShow = False: Disable
2. Các thuộc tính:
Tên thuộc tính Miêu tả Chi tiết
TypeDrawObj Chọn loại đối tượng vẽ Kiểu dữ liệu: long
= 1 : Vẽ đường thẳng
= 2 : Vẽ đường tròn
V./ Cài đặt XDDraw với Visual Basic.
- Đăng ký activeX:
Vào Command Prompt/ chuyển đến thư mục chứa file XDDraw.ocx rồi sử dụng lệnh:
Regsvr32 XDDraw.ocx.
- Vào menu Project/ Component (Ctrl + T): chọn XDDraw Control
- Từ menu ToolBox kéo thả điều khiển có tên là XDDraw.
- Trong phần giao diện Menu Editor thêm các menu như sau:
Sau đây là phần code của chương trình ví dụ này:
Private Sub draw_Click()
XDDraw1.SetColor 200, 0, 100
End Sub
Private Sub drawcircle_Click()
XDDraw1.TypeDrawObj = 2
' TypeDrawObj: 1 - line; 2 - circle
drawcircle.Checked = True
drawline.Checked = False
End Sub
Private Sub drawing_Click()
XDDraw1.SetMouseAction 1
' MouseAction: 1 - Drawing; 2 - Pan
drawtype.Enabled = True
pan.Checked = False
drawing.Checked = True
End Sub
Private Sub Form_Load()
'XDDraw1.Move 0, 0, ScaleWidth, ScaleHeight
XDDraw1.ShowVungBam True
' ShowVungBam: True - Enable; False - Disable
'XDDraw1.SetBkColor 0, 200, 0
' SetBkColor: Set background color with the RGB color system
XDDraw1.SetColor 200, 255, 255
' SetColor: Set Drawing color with the RGB color system
End Sub
Private Sub drawline_Click()
XDDraw1.TypeDrawObj = 1
drawline.Checked = True
drawcircle.Checked = False
End Sub
Private Sub pan_Click()
XDDraw1.SetMouseAction 2
drawtype.Enabled = False
pan.Checked = True
drawing.Checked = False
End Sub