点击或拖拽改变大小

SldWorksExtensionOpenInvisibleReadOnly 方法

以不可见模式打开文档 Open a document invisibly. It will not be shown to the user but you will be able to interact with it through the API as if it is loaded.

命名空间:  Du.SolidWorks.Extension
程序集:  Du.SolidWorks (在 Du.SolidWorks.dll 中) 版本:0.1.1.0 (0.1.1)
语法
public static ModelDoc2 OpenInvisibleReadOnly(
	this ISldWorks sldWorks,
	string toolFile,
	bool visible = false,
	swDocumentTypes_e type = swDocumentTypes_e.swDocPART
)

参数

sldWorks
类型:ISldWorks

[缺少 "M:Du.SolidWorks.Extension.SldWorksExtension.OpenInvisibleReadOnly(SolidWorks.Interop.sldworks.ISldWorks,System.String,System.Boolean,SolidWorks.Interop.swconst.swDocumentTypes_e)" 的 <param name="sldWorks"/> 文档]

toolFile
类型:SystemString

[缺少 "M:Du.SolidWorks.Extension.SldWorksExtension.OpenInvisibleReadOnly(SolidWorks.Interop.sldworks.ISldWorks,System.String,System.Boolean,SolidWorks.Interop.swconst.swDocumentTypes_e)" 的 <param name="toolFile"/> 文档]

visible (Optional)
类型:SystemBoolean

[缺少 "M:Du.SolidWorks.Extension.SldWorksExtension.OpenInvisibleReadOnly(SolidWorks.Interop.sldworks.ISldWorks,System.String,System.Boolean,SolidWorks.Interop.swconst.swDocumentTypes_e)" 的 <param name="visible"/> 文档]

type (Optional)
类型:swDocumentTypes_e

[缺少 "M:Du.SolidWorks.Extension.SldWorksExtension.OpenInvisibleReadOnly(SolidWorks.Interop.sldworks.ISldWorks,System.String,System.Boolean,SolidWorks.Interop.swconst.swDocumentTypes_e)" 的 <param name="type"/> 文档]

返回值

类型:ModelDoc2

[缺少 "M:Du.SolidWorks.Extension.SldWorksExtension.OpenInvisibleReadOnly(SolidWorks.Interop.sldworks.ISldWorks,System.String,System.Boolean,SolidWorks.Interop.swconst.swDocumentTypes_e)" 的 <returns> 文档]

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型 ISldWorks 的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。
参见