文檔首頁>>VectorDraw Developer Framework使用教程>>VDF常見問題整理(三十七):Javascript Webcontrol默認屬性值
VDF常見問題整理(三十七):Javascript Webcontrol默認屬性值
VectorDraw Developer Framework(VDF)是一個用于應用程序可視化的圖形引擎庫。有了VDF提供的功能,您可以輕松地創(chuàng)建、編輯、管理、輸出、輸入和打印2D和3D圖形文件。
VectorDraw Developer Framework試用版下載
問:
請問如何獲得Javascript Webcontrol默認屬性值。
答:
為了使vds文件的大小較小,我們不保存一些默認值,因此假定未定義屬性時,它通常使用默認值。在下面,您可以查看它們使用默認值的所有屬性,以及如何獲取正確值的示例。
vdDocument -> object return by vdcanvas.GetDocument() method ShowHatches : true BlockStdLayerOper :BlockStdLayerOperFlag.Default = 6 LineTypeScale : 1.0 ShowHidenEdges : false vd3dFace EdgeVisibility : 0 vdAttrib InVisibleMode : false ValueString : ""(empty string) TagString : ""(empty string) TextString : ""(empty string) IsConstant : false vdAttribDef InVisibleMode : false ValueString : ""(empty string) PromptString : ""(empty string) TagString : ""(empty string) TextString : ""(empty string) IsConstant : false vdCircle AlignToViewSize : 0 Thickness : 0.0 vdEllipse MajorAngle : 0.0 vdPolyline SPlineFlag : VdConstSplineFlag.SFlagSTANDARD = 0 Flag : VdConstPlineFlag.PlFlagOPEN = 0 vdInsert AlignToViewSize : 0 Xscale : 1.0 Yscale : 1.0 Zscale : 1.0 Rotation : 0.0 Rows : 1 Columns : 1 ColumnDist : 0.0 RowDist : 0 vdPoint AlignToViewSize : 0 vdPolyHatch Thickness : 0.0 vdText Flag : VdConstTextstyleFlag.LEFTTORIGHT = 0 Rotation : 0.0 WidthFactor : 1.0 BackgroundMaskBorder : false BackGroundMaskBorderPenWidth : VdConstLineWeight.LW_0 = 0 BackGroundMaskBorderColor : Empty (means no border color) BackGroundMask : false BackGroundMaskOffset : 0.0 BackGroundMaskColor : Empty (means no mask color) TextLine : grTextStyleExtra.TextLineFlags.None = 0 ObliqueAngle : 0.0 AlignToViewSize : 0 VerJustify : VdConstVerJust.VdTextVerBaseLine = 24 HorJustify : VdConstHorJust.VdTextHorLeft = 0 vdPrimary Label : ""(empty string) vdBlock ExternalReferencePath : ""(empty string) vdFigure Layer : 0 visibility : VisibilityEnum.Visible) PenColor : ByLayer) LineType : ByLayer PenWidth : 0.0 URL : " " (empty string) ToolTip : " "( empty string) LineTypeScale : 1.0 LineWeight : VdConstLineWeight.LW_BYLAYER (==-1)) TransparencyMethod : TransparencyMethodEnum.Default (==2)) vdLayer Frozen : false On : true Lock : false vdLayout ShowHidenEdges : false vdLineType DrawMethod : LineType.LineTypeDrawMethod.Center = 1 IsDPIScale : false ============================================================================================== Default object types are defined for all vdPrimary objects by the property name '_t' and it takes the following values. vdConst.vdLine_code = 1; vdConst.vdPolyline_code = 2; vdConst.vdText_code = 3; vdConst.vdRect_code = 4; vdConst.vdCircle_code = 5; vdConst.vdEllipse_code = 6; vdConst.vdArc_code = 7; vdConst.vdImage_code = 8; vdConst.vdInsert_code = 9; vdConst.vd3DFace_code = 10; vdConst.vdPolyface_code = 11; vdConst.vdAttrib_code = 12; vdConst.vdAttribDef_code = 13; vdConst.vdInfinityLine_code = 14; vdConst.vdPoint_code = 15; vdConst.vdViewport_code = 16; vdConst.vdPolyhatch_code = 17; vdConst.vdLayout_code = 18; vdConst.vdBlock_code = 19; vdConst.vdLayer_code = 20; vdConst.vdTextstyle_code = 21; vdConst.vdHatchPattern_code = 22; vdConst.vdLineType_code = 23; Following are not supported but they are displayed as exploded blocks that contains previous known objects vdConst.vdDimension_code = 24; vdConst.vdMText_code = 25; vdConst.vdImageDef_code = 26; vdConst.vdMultiline_code = 27; vdConst.vdGroundSurface_code = 28; vdConst.vdLeader_code = 29; vdConst.vdArcAlignedText = 30; =============================================================================================== Example how to get an object layer which is undefined. var activelayout = vdcanvas.GetActiveLayout(); for(i = ).. var fig = vdcanvas.GetEntityItem(activelayout.Entities.Item[i]); var layerref = vdcanvas.GetEntityItem(fig.Layer); if (!layerref ) layerref = vdcanvas.FindLayer("0"); var linetyperef = vdcanvas.GetEntityItem(fig.LineType); if (!linetyperef ) linetyperef = vdcanvas.FindLineType("ByLayer"); ....
對于以上問答,如果您有任何的疑惑都可以在評論區(qū)留言,我們會及時回復。此系列的問答教程我們會持續(xù)更新,如果您感興趣,可以多多關注本教程。
熱門文章推薦:
如果您對想要購買正版授權VectorDraw Developer Framework(VDF),可以聯(lián)系在線客服>>咨詢相關問題。
關注慧聚IT微信公眾號 ???,了解產品的最新動態(tài)及最新資訊。