CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2020 开发者帮助

IncludeDGNUnderlay 属性 (ActiveX/ATO)

2024-5-18 18:24| 发布者: admin| 查看: 71| 评论: 0|原作者: admin|来自: AutoCAD

IncludeDGNUnderlay 属性 (ActiveX/ATO)

指定传递包中是否包含 DGN 参考底图的引用文件。

支持的平台:仅限 Windows

命名空间:传输塔利布

程序集: acETransmit20.tlb

签名

VBA/VB.NET/C#:

object.includeDGNUnderlay
对象

类型:TransmittalInfo

此属性应用于的对象。

属性值

只读:

类型:

  • 0 (False) - 引用的 DGN 文件从传递包中排除
  • 1 (True) - 引用的 DGN 文件包含在传输包中

言论

没有其他评论。

发行信息

释放:AutoCAD 2007 及更高版本

历史

  • 该界面已与 AutoCAD 2010 版库中的界面合并。ITransmittalInfo2ITransmittalInfo
  • 该特性是在 AutoCAD 2007 版本的库中引入的。includeDGNUnderlayITransmittalInfo2

例子

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   苏公网安备32011402011833)

GMT+8, 2024-12-15 12:41

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部