文档彩票走势图>>VectorDraw Developer Framework使用教程>>VDF常见问题整理(三十七):Javascript Webcontrol默认属性值
VDF常见问题整理(三十七):Javascript Webcontrol默认属性值
VectorDraw Developer Framework(VDF)是一个用于应用程序可视化的图形引擎库。有了VDF提供的功能,您可以轻松地创建、编辑、管理、输出、输入和打印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"); ....
对于以上问答,如果您有任何的疑惑都可以在评论区留言,我们会及时回复。此系列的问答教程我们会持续更新,如果您感兴趣,可以多多关注本教程。
热门文章推荐:
如果您对想要购买正版授权VectorDraw Developer Framework(VDF),可以联系咨询相关问题。
关注慧聚IT微信公众号 ???,了解产品的最新动态及最新资讯。