• <menu id="w2i4a"></menu>
  • logo VectorDraw教程
    文檔首頁(yè)>>VectorDraw教程>>新手入門必看:VectorDraw 常見問題整理大全(八)

    新手入門必看:VectorDraw 常見問題整理大全(八)


    VectorDraw Developer Framework(VDF)是一個(gè)用于應(yīng)用程序可視化的圖形引擎庫(kù)。有了VDF提供的功能,您可以輕松地創(chuàng)建、編輯、管理、輸出、輸入和打印2D和3D圖形文件。該庫(kù)還支持許多矢量和柵格輸入和輸出格式,包括本地PDF和SVG導(dǎo)出。

    VectorDraw Developer Framework最新版下載

    VectorDraw web library (javascript)是一個(gè)矢量圖形庫(kù)。VectorDraw web library (javascript)不僅能打開CAD圖紙,而且能顯示任何支持HTML5標(biāo)準(zhǔn)平臺(tái)上的通用矢量對(duì)象,如Windows,安卓,iOS和Linux。無(wú)需任何安裝,VectorDraw web library (javascript)就可以運(yùn)行在任何支持canvas標(biāo)簽和Javascript的主流瀏覽器(Chrome, Firefox, Safari, Opera, Dolphin, Boat等等)中。

    VectorDraw web library (javascript)最新版下載

    一. 已編譯的項(xiàng)目無(wú)法與安裝的其他VDF版本一起使用

    問:我創(chuàng)建了一個(gè)使用VectorDraw控件6009編譯的簡(jiǎn)單應(yīng)用程序。所有VectorDraw dll引用都是使用Specific Version = false和Copy Local = false編譯的。此應(yīng)用程序僅適用于具有VectorDraw 6009的計(jì)算機(jī),如果它在VectorDraw 6011計(jì)算機(jī)上運(yùn)行則拋出異常。在項(xiàng)目中,我不使用6011中但在6009中丟失或更改的任何屬性/方法/事件?

    答:注意:不建議使用以下解決方案。我們建議使用相同的VDF版本構(gòu)建和重新分發(fā)您的應(yīng)用程序。

    您可以通過分發(fā)配置文件來重定向VectorDraw dll的版本。

    對(duì)于VectorDraw程序集dll,配置文件必須如下所示。此外,它必須與您的應(yīng)用程序.exe放在同一目錄中,并且必須使用格式重命名(yourapplicationname.exe.config)

    此配置文件將使用6.1.6011.0重定向所有版本的VectorDraw程序集(請(qǐng)注意,這些dll必須存在于分發(fā)計(jì)算機(jī)中)

    <?xml version =“1.0”?> 
    <configuration> 
    <runtime> 
    <assemblyBinding xmlns =“urn:schemas-microsoft-com:asm.v1”> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.Actions”publicKeyToken =“54eac14e23c9ee53 “culture =”neutral“/> 
       <bindingRedirect oldVersion =”0.0.0.0-6.1.65535.65535“newVersion =”6.1.6011.0“/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =”VectorDraw.Generics“publicKeyToken =”54eac14e23c9ee53 “culture =”neutral“/> 
       <bindingRedirect oldVersion =”0.0.0.0-6.1.65535.65535“newVersion =”6.1.6011.0“/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.Geometry”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/>
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.Render”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“RenderFormats”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.Serialize”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/>
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VDrawBaseControl”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“vdCommandLine”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion = “0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly>
       <assemblyIdentity name =“vdFramedControl”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/>
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.Professional”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“vdPropertyGrid”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“vdScrollableControl”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/>
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“WinMsgMannager”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.ExDialogs”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VectorDraw.Fonts”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/>
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VdProControl”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“vdxFcnv”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion = “0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly>
       <assemblyIdentity name =“OpenVDF”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/>
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“vdDXF”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion =“0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    <dependentAssembly> 
       <assemblyIdentity name =“VdrawPro5”publicKeyToken =“54eac14e23c9ee53”culture =“neutral”/> 
       <bindingRedirect oldVersion = “0.0.0.0-6.1.65535.65535”newVersion =“6.1.6011.0”/> 
    </ dependentAssembly> 
    </ assemblyBinding> 
    </ runtime> 
    </ configuration>

    相反也是可能的,比如使用6011構(gòu)建你的exe并使其運(yùn)行6009安裝。在這種情況下,使用6011構(gòu)建項(xiàng)目時(shí)使用的屬性/方法/事件不應(yīng)從6011更改為6009。

    二. 設(shè)置顯示工具提示之前的延遲時(shí)間

    問:我們?cè)谖覀兊能浖袑?duì)某些繪圖對(duì)象使用VDraw工具提示。今天,工具提示完全顯示在光標(biāo)在對(duì)象上移動(dòng)的那一刻。是否可以在顯示工具提示之前設(shè)置延遲(例如2秒)?

    答:可以通過應(yīng)用程序中的代碼實(shí)現(xiàn),如下所示。您將需要一個(gè)將在MouseMove事件上啟動(dòng)的Timer,并且在計(jì)時(shí)器代碼上將顯示一個(gè)代碼,該代碼將顯示工具提示。這樣,工具提示將在設(shè)置為計(jì)時(shí)器的時(shí)間間隔之后顯示,并且鼠標(biāo)不在實(shí)體上移動(dòng)。

    //On Form Load we initialize the events.
    //Note that EnableTooltips is set to False!!!!!
    private void Form1_Load(object sender, EventArgs e)
    {
    //........
    vdFramedControl.BaseControl.MouseMove += new MouseEventHandler(BaseControl_MouseMove);
    mTimer.Interval = 5000;
    mTimer.Tick += new EventHandler(mTimer_Tick);
    vdFramedControl.BaseControl.ActiveDocument.EnableToolTips = false;
    mTimer.Start();
    }
    
    //On mouse move we constantly reset the timer
    void BaseControl_MouseMove(object sender, MouseEventArgs e)
    {
    mTimer.Stop();
    mTimer.Start();
    }
    
    //On the timer's code we write the following in order to show the tooltip
    void mTimer_Tick(object sender, EventArgs e)
    {
    if (!vdFramedControl.BaseControl.Visible) return;
    if (vdFramedControl.BaseControl.ActiveDocument.ActiveLayOut.OverAllActiveActions.Count > 1) return;
    VectorDraw.Actions.BaseAction action = vdFramedControl.BaseControl.ActiveDocument.ActiveLayOut.OverAllActiveAction;
    if (!action.IsVisible) return;
    vdFramedControl.BaseControl.ActiveDocument.EnableToolTips = true;
    //This will show the tooltip if there is any!!!!
    action.MouseMove(new MouseEventArgs(MouseButtons.None, 0, action.GdiMouseLocation.X, action.GdiMouseLocation.Y, 0), action.MouseLocation, action.OrthoPoint);
    vdFramedControl.BaseControl.ActiveDocument.EnableToolTips = false;
    }
    
    //Don't forget to do the finalizations at the closing of the application
    protected override void OnClosing(CancelEventArgs e)
    {
    mTimer.Tick -= new EventHandler(mTimer_Tick);
    vdFramedControl.BaseControl.MouseMove -= new MouseEventHandler(BaseControl_MouseMove);
    mTimer.Stop();
    mTimer.Dispose();
    base.OnClosing(e);
    }

    三. 過濾選擇文檔特定布局的所有圖層的所有折線

    問:如何過濾選擇文檔特定布局的所有圖層的所有折線?

    答:可通過以下代碼實(shí)現(xiàn):

    //Create a selection
    VectorDraw.Professional.vdCollections.vdSelection selset = new vdSelection("Myselset");
    selset.SetUnRegisterDocument(vdFramedControl1.BaseControl.ActiveDocument);
    
    //Create a filter
    VectorDraw.Professional.vdObjects.vdFilterObject filter = new vdFilterObject();
    
    //Add ALL Layer names to the filter(you can add simply 1 layer if you want
    foreach (vdLayer var in vdFramedControl1.BaseControl.ActiveDocument.Layers)
    {
    filter.Layers.AddItem(var.Name);
    }
    
    //Add vdPolyline to select all polylines
    filter.Types.AddItem("vdPolyline");
    
    //Add the name of the layout you want to check if no name is specified then ALL layouts will be checked
    filter.LayOuts.AddItem(vdFramedControl1.BaseControl.ActiveDocument.ActiveLayOut.Name);
    
    //Apply the filter. After this the selection will contain the selected polylines.
    selset.FilterSelect(filter);

    四. 不想顯示選擇交叉綠色和窗口藍(lán)色矩形以及不在夾點(diǎn)選擇中添加的所選實(shí)體

    問:我不想顯示選擇交叉綠色和窗口藍(lán)色矩形以及不在夾點(diǎn)選擇中添加的所選實(shí)體,可以怎么做?

    答:應(yīng)用程序表單中的帶有vdFrameControl的C#中的示例:

    using System;
    
    using System.Collections.Generic;
    
    using System.ComponentModel;
    
    using System.Data;
    
    using System.Drawing;
    
    using System.Text;
    
    using System.Windows.Forms;
    
    using VectorDraw.Professional.vdCollections;
    
    namespace WindowsApplication1
    
    {
    
    public partial class Form1 : Form
    
    {
    
    public Form1()
    
    {
    
    InitializeComponent();
    
    }
    
    protected override void OnLoad(EventArgs e)
    
    {
    
    base.OnLoad(e);
    
    //do not show the green and blue selecting colors
    
    vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.SelectingCrossColor = Color.Empty;
    
    vdFramedControl1.BaseControl.ActiveDocument.GlobalRenderProperties.SelectingWindowColor = Color.Empty;
    
    vdFramedControl1.BaseControl.ActiveDocument.OnFilterFigure += new VectorDraw.Professional.vdObjects.vdDocument.FilterFigureEventHandler(ActiveDocument_OnFilterFigure);
    
    }
    
    void ActiveDocument_OnFilterFigure(object sender, VectorDraw.Professional.Constants.VdConstFilterFig JobId, VectorDraw.Professional.vdPrimaries.vdFigure fig, ref bool cancel)
    
    {
    
    //do not add the entities in default vdraw grip selections.
    
    if (JobId != VectorDraw.Professional.Constants.VdConstFilterFig.FILTERFIG_SELECT) return;
    
    if (fig == null) return;
    
    vdSelection gripset = sender as vdSelection;
    
    if (gripset == null) return;
    
    if (!gripset.Name.StartsWith("VDGRIPSET")) return;
    
    cancel = true;
    
    //throw new Exception("The method or operation is not implemented.");
    
    }
    
    }
    
    }

    未完待續(xù)......

    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();