CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

包括卸载的XrefDwg 属性(ActiveX/ATO)

2023-1-1 21:22| 发布者: admin| 查看: 137| 评论: 0|来自: AutoCAD

摘要: 指定传递包中是否包括未引用的外部参照 (xref) 的文件。

指定传递包中是否包括未引用的外部参照 (xref) 的文件。

支持的平台:仅窗口

Namespace:传输利布

组装:acETransmit20.tlb

签名

VBA/VB.NET/C#:

object.includeUnloadedXrefDwg
对象

类型:传输信息

此属性适用的对象。

属性值

只读:

类型:

  • 0(假)- 从传递包中排除未参照的外部参照文件
  • 1(真)- 传递包中包含未参照的外部参照文件

言论

没有额外的评论。

发布信息

释放:AutoCAD 2010 及更高版本

例子

VB.NET:

' Custom function used to setup a TransmittalInfo object
Private Shared Function TransInfo(ti As TransmittalInfo, destination As String) _
    As TransmittalInfo

    ' Specify the folder that the files should be copied to
    If System.IO.Directory.Exists(destination) = False Then
        System.IO.Directory.CreateDirectory(destination)
    End If

    ' Assign the location which the transmittal package should be stored
    ti.destinationRoot = destination

    ' Maintain sub directories (0 - False, 1 - True)
    ti.preserveSubdirs = vbTrue

    ' Maintain folder paths
    ' ti.organizedFolder = 0 and ti.preserveSubdirs = 0 - 
    '             All files are placed in a single folder which is specified 
    '             by the destinationRoot property
    ' ti.organizedFolder = 1 and ti.preserveSubdirs = 0 - 
    '             Files are placed in a single folder, but maintain one level 
    '             of subdirectory strcuture
    ' ti.organizedFolder = 0 and ti.preserveSubdirs = 1 - 
    '             Folder structure is maintained, but the paths for 
    '             reference files are not
    ' ti.organizedFolder = 1 and ti.preserveSubdirs = 1 - 
    '             Folder structure and reference paths are maintained
    ti.organizedFolder = vbTrue

    ' Change referenced files to use relative paths (0 - False, 1 - True)
    ti.dataLinkRelativePath = vbTrue
    ti.DGNUnderlayRelativePath = vbTrue
    ti.DWFUnderlayRelativePath = vbTrue
    ti.imageRelativePath = vbTrue
    ti.PDFUnderlayRelativePath = vbTrue
    ti.xrefRelativePath = vbTrue

    ' Set the default drawing file format for all DWG, DWT, and DWS files
    ' SaveDwgFormat.eAutoCAD14 - AutoCAD R14
    ' SaveDwgFormat.eAutoCAD2000 - AutoCAD 2000
    ' SaveDwgFormat.eAutoCADR18 - AutoCAD 2004
    ' SaveDwgFormat.eAutoCADR21 - AutoCAD 2007
    ' SaveDwgFormat.eAutoCADR24 - AutoCAD 2010
    ' SaveDwgFormat.eAutoCADR27 - AutoCAD 2013
    ' SaveDwgFormat.eAutoCADR32 - AutoCAD 2018
    ' SaveDwgFormat.eNoConversion - Keep current format
    ti.saveVersion = SaveDwgFormat.eNoConversion

    ' Maintain visual fidelity (SAVEFIDELITY system variable)
    ' 0 - Saved without visual fidelity 
    ' 1 - Annotation objects assigned annotative scales are saved to
    '     separate layers for each scale used.
    '     Only affects drawings when saving to AutoCAD 2007 or earlier file formats.
    ti.visualFidelity = vbTrue

    ' Include DWG Xrefs (Unloaded and Unreferenced: 0 - False, 1 - True)
    ti.includeXrefDwg = vbTrue
    ti.includeUnloadedReferences = vbTrue
    ti.includeUnloadedXrefDwg = vbTrue
    ti.includeNestedOverlayXrefDwg = vbTrue

    ' Bind xrefs attached to a drawing (0 - False, 1 - True)
    ' BindType.eBind - Use the Bind type to bind the xrefs
    ' BindType.eInsert - Use the Insert type to bind the xrefs
    ti.BindType = BindType.eInsert

    ' Remove paths from xrefs (0 - False, 1 - True)
    ti.depathXrefs = vbTrue

    ' Include images, underlays, and datalink file (0 - False, 1 - True)
    ti.includeImageFile = vbTrue
    ti.includeDGNUnderlay = vbTrue
    ti.includeDWFUnderlay = vbTrue
    ti.includePDFUnderlay = vbTrue
    ti.includeDataLinkFile = vbTrue

    ' Include font (SHX/TTF) and font map (FMP) files (0 - False, 1 - True)
    ti.includeFontFile = vbTrue

    ' Reset plotters for layouts in the drawings to None, 
    ' and include plot style (CTB/STB) files (0 - False, 1 - True)
    ti.resetPlotter = vbFalse
    ti.includePlotFile = vbTrue

    ' Specify where the plot files are located so the API can resolve the file 
    ' paths (used when includePlotFile = vbTrue or 1)
    ti.plotConfigFilePath = Environment.GetEnvironmentVariable("UserProfile") + _
             "\AppData\Roaming\Autodesk\AutoCAD <release>\<version>\enu\Plotters"
    ti.plotStyleTablePath = Environment.GetEnvironmentVariable("UserProfile") + _
             "\AppData\Roaming\Autodesk\AutoCAD <release>\<version>\enu\Plotters\Plot Styles"

    ' Get the photometric Web and material files used by lights 
    ' and 3D objects for rendering (0 - False, 1 - True)
    ti.includePhotometricWebFile = vbTrue
    ti.includeMaterialTextureFile = vbTrue

    ' Purge unused named objects for all drawing files in the 
    ' Transmittal(Package(0 - False, 1 - True))
    ti.purgeDatabase = vbFalse

    Return ti
End Function

C#:

// Custom function used to setup a TransmittalInfo object
private static TransmittalInfo TransInfo(TransmittalInfo ti, string destination)
{
    // Specify the folder that the files should be copied to
    if (System.IO.Directory.Exists(destination) == false)
    {
        System.IO.Directory.CreateDirectory(destination);
    }

    // Assign the location which the transmittal package should be stored
    ti.destinationRoot = destination;

    // Maintain sub directories (0 - False, 1 - True)
    ti.preserveSubdirs = 1;

    /*
        Maintain folder paths
        ti.organizedFolder = 0 and ti.preserveSubdirs = 0 - 
                    All files are placed in a single folder which is specified 
                    by the destinationRoot property
        ti.organizedFolder = 1 and ti.preserveSubdirs = 0 - 
                    Files are placed in a single folder, but maintain one level 
                    of subdirectory strcuture
        ti.organizedFolder = 0 and ti.preserveSubdirs = 1 - 
                    Folder structure is maintained, but the paths for 
                    reference files are not
        ti.organizedFolder = 1 and ti.preserveSubdirs = 1 - 
                   Folder structure and reference paths are maintained
    */
    ti.organizedFolder = 1;

    // Change referenced files to use relative paths (0 - False, 1 - True)
    ti.dataLinkRelativePath = 1;
    ti.DGNUnderlayRelativePath = 1;
    ti.DWFUnderlayRelativePath = 1;
    ti.imageRelativePath = 1;
    ti.PDFUnderlayRelativePath = 1;
    ti.xrefRelativePath = 1;

    /* Set the default drawing file format for all DWG, DWT, and DWS files
        SaveDwgFormat.eAutoCAD14 - AutoCAD R14
        SaveDwgFormat.eAutoCAD2000 - AutoCAD 2000
        SaveDwgFormat.eAutoCADR18 - AutoCAD 2004
        SaveDwgFormat.eAutoCADR21 - AutoCAD 2007
        SaveDwgFormat.eAutoCADR24 - AutoCAD 2010
        SaveDwgFormat.eAutoCADR27 - AutoCAD 2013
        SaveDwgFormat.eAutoCADR32 - AutoCAD 2018
        SaveDwgFormat.eNoConversion - Keep current format
    */
    ti.saveVersion = SaveDwgFormat.eNoConversion;

    /*
        Maintain visual fidelity (SAVEFIDELITY system variable)
        0 - Saved without visual fidelity 
        1 - Annotation objects assigned annotative scales are saved to
            separate layers for each scale used.
            Only affects drawings when saving to AutoCAD 2007 or earlier file formats.
    */
    ti.visualFidelity = 1;

    // Include DWG Xrefs (Unloaded and Unreferenced: 0 - False, 1 - True)
    ti.includeXrefDwg = 1;
    ti.includeUnloadedReferences = 1;
    ti.includeUnloadedXrefDwg = 1;
    ti.includeNestedOverlayXrefDwg = 1;

    /*
        Bind xrefs attached to a drawing (0 - False, 1 - True)
        BindType.eBind - Use the Bind type to bind the xrefs
        BindType.eInsert - Use the Insert type to bind the xrefs
    */
    ti.BindType = BindType.eInsert;

    // Remove paths from xrefs (0 - False, 1 - True)
    ti.depathXrefs = 1;

    // Include images, underlays, and datalink file (0 - False, 1 - True)
    ti.includeImageFile = 1;
    ti.includeDGNUnderlay = 1;
    ti.includeDWFUnderlay = 1;
    ti.includePDFUnderlay = 1;
    ti.includeDataLinkFile = 1;

    // Include font (SHX/TTF) and font map (FMP) files (0 - False, 1 - True)
    ti.includeFontFile = 1;

    // Reset plotters for layouts in the drawings to None, 
    // and include plot style (CTB/STB) files (0 - False, 1 - True)
    ti.resetPlotter = 0;
    ti.includePlotFile = 1;

    // Specify where the plot files are located so the API can resolve the file 
    // paths (used when includePlotFile = True or 1)
    ti.plotConfigFilePath = Environment.GetEnvironmentVariable("UserProfile") + 
                            "\\AppData\\Roaming\\Autodesk\\AutoCAD <release>\\<version>\\enu\\Plotters";
    ti.plotStyleTablePath = Environment.GetEnvironmentVariable("UserProfile") + 
                            "\\AppData\\Roaming\\Autodesk\\AutoCAD <release>\\<version>\\enu\\Plotters\\Plot Styles";

    // Get the photometric Web and material files used by lights 
    // and 3D objects for rendering (0 - False, 1 - True)
    ti.includePhotometricWebFile = 1;
    ti.includeMaterialTextureFile = 1;

    // Purge unused named objects for all drawing files in the 
    // Transmittal(Package(0 - False, 1 - True))
    ti.purgeDatabase = 0;

    return ti;
}

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-11 20:22

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部