IModelDocExtension【从元数据】----功能类别(1)Application Interfaces---更新中

本文档详细介绍了SolidWorks API中的IModelDocExtension接口,包括其各种方法如GetMassProperties、InsertDwgOrDxfFile、PrintOut等,用于实现对模型属性、文件插入、打印及选择等操作的编程控制。适用于使用C#进行SolidWorks二次开发的开发者。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

using System.Runtime.InteropServices;

namespace SolidWorks.Interop.sldworks
{
[Guid(“99F4D4AF-F268-4EE1-8C55-041F7BECF879”)]
[TypeLibType(TypeLibTypeFlags.FHidden | TypeLibTypeFlags.FDual | TypeLibTypeFlags.FDispatchable)]
public interface IModelDocExtension
{
[DispId(2)]
dynamic GetMassProperties(int Accuracy, ref int Status);
[DispId(3)]
double IGetMassProperties(int Accuracy, ref int Status);
[DispId(4)]
bool InsertDwgOrDxfFile(string FileName);
[DispId(5)]
void PrintOut(int FromPage, int ToPage, int Copies, bool Collate, string Printer, string PrintFileName);
[DispId(6)]
bool SelectByID(string Name, string Type, double X, double Y, double Z, bool Append, int Mark, Callout Callout);
[DispId(7)]
dynamic IGet3rdPartyStorageStore(string SubStorageName, bool IsStoring);
[DispId(8)]
bool IRelease3rdPartyStorageStore(string SubStorageName);
[DispId(11)]
dynamic GetSectionProperties(object Sections);
[DispId(12)]
double IGetSectionProperties(int Count, ref object Sections);
[DispId(13)]
MassProperty CreateMassProperty();
[DispId(14)]
MathTransform GetCoordinateSystemTransformByName(string NameIn);
[DispId(15)]
void SetMaterialPropertyValues(object Material_property_values, int Config_opt, object Config_names);
[DispId(16)]
void ISetMaterialPropertyValues(ref double Material_values, int Config_opt, int Config_count, ref string Config_names);
[DispId(17)]
dynamic GetMaterialPropertyValues(int Config_opt, object Config_names);
[DispId(18)]
double IGetMaterialPropertyValues(int Config_opt, int Config_count, ref string Config_names);
[DispId(19)]
void PrintOut2(object PageArray, int Copies, bool Collate, string Printer, string PrintFileName);
[DispId(20)]
void IPrintOut2(int ArraySize, ref int PageArray, int Copies, bool Collate, string Printer, string PrintFileName);
[DispId(21)]
dynamic GetPersistReference(object DispObj);
[DispId(22)]
int GetPersistReferenceCount(object DispObj);
[DispId(23)]
byte IGetPersistReference(object DipsObj, int Count);
[DispId(24)]
dynamic GetObjectByPersistReference(object PersistId);
[DispId(25)]
dynamic IGetObjectByPersistReference(int Count, ref byte PersistId);
[DispId(26)]
dynamic GetStream(int StreamType, out bool ReadOnly);
[DispId(27)]
bool ReleaseStream(int StreamType);
[DispId(28)]
Feature GetLastFeatureAdded();
[DispId(29)]
int IMultiSelect(int Count, ref object Objects, bool AppendFlag, SelectData Data);
[DispId(30)]
int MultiSelect(object Objects, bool AppendFlag, object Data);
[DispId(31)]
double GetParameterValue(string DimName, int Reserved);
[DispId(32)]
int SetParameterValue(string DimName, double Value, int Reserved);
[DispId(33)]
void MoveOrCopy(bool Copy, int NumCopies, bool KeepRelations, double BaseX, double BaseY, double BaseZ, double DestX, double DestY, double DestZ);
[DispId(34)]
void RotateOrCopy(bool Copy, int NumCopies, bool KeepRelations, double BaseX, double BaseY, double BaseZ, double DestX, double DestY, double DestZ, double Angle);
[DispId(35)]
void ScaleOrCopy(bool Copy, int NumCopies, double BaseX, double BaseY, double BaseZ, double Scale);
[DispId(36)]
bool ApplyTexture(int Scale, double Angle, string TextureFilename, bool BlendColor);
[DispId(37)]
bool RemoveTexture();
[DispId(38)]
bool RemoveMaterialProperty(int Config_opt, object Config_names);
[DispId(39)]
bool IRemoveMaterialProperty(int Config_opt, int Config_count, ref string Config_names);
[DispId(40)]
void RemoveModelColorizer(object PInterface);
[DispId(41)]
void InstallModelColorizer(object PInterface);
[DispId(42)]
bool HasDesignTable();
[DispId(43)]
void ListExternalFileReferences(out object ModelPathName, out object ComponentPathName, out object Feature, out object DataType, out object Status, out object RefEntity, out object FeatCom, out int ConfigOption, out string ConfigName);
[DispId(44)]
int ListExternalFileReferencesCount();
[DispId(45)]
void IListExternalFileReferences(int NumRefs, out string ModelPathName, out string CompPathName, out string Feature, out string DataType, out int Status, out string RefEntity, out string FeatComp, out int ConfigOption, out string ConfigName);
[DispId(46)]
void UpdateExternalFileReferences(int ConfigOption, string ConfigName, int UpdateStatus);
[DispId(48)]
SFSymbol InsertSurfaceFinishSymbol3(int SymType, int LeaderType, double LocX, double LocY, double LocZ, int LaySymbol, int ArrowType, string MachAllowance, string OtherVals, string ProdMethod, string SampleLen, string MaxRoughness, string MinRoughness, string RoughnessSpacing);
[DispId(49)]
DatumTargetSym InsertDatumTargetSymbol2(string Datum1, string Datum2, string Datum3, short AreaStyle, bool AreaOutside, double Value1, double Value2, string ValueStr1, string ValueStr2, bool ArrowsSmart, short ArrowStyle, short LeaderLineStyle, bool LeaderBent, bool ShowArea, bool ShowSymbol);
[DispId(50)]
Texture GetTexture(string Config_name);
[DispId(51)]
bool SetTexture(string Config_name, Texture TextureIn);
[DispId(52)]
bool RemoveTexture2(string Config_name);
[DispId(53)]
Texture CreateTexture(string MatName, double Scale, double Angle, bool Blend);
[DispId(54)]
dynamic GetObjectByPers

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值