c# - 使用 C# SDK 在 AutoCAD 的活动设计文档中创建 PropertySet
问题描述
我正在尝试在 AutoCAD 中当前活动的设计文档中创建 PropertySet,但在以下行中出现异常 eInvalidInput,
var dictionaryPropertyDataFormat = new DictionaryPropertyDataFormat(database);
整个方法如下所示。
internal static void CreatePropertySet()
{
var database = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database;
try
{
var dictionaryPropertyDataFormat = new DictionaryPropertyDataFormat(database);
var propertySetDefinition = new PropertySetDefinition();
using (Transaction transaction1 = database.TransactionManager.StartTransaction())
{
//Code to create PropertySet.
}
}
catch(System.Exception ex)
{
MessageBox.Show(ex.Message);
}
}
关于我在这里做错的任何建议或想法。
提前致谢。
解决方案
推荐阅读
- jquery - 如何在jquery中使用父函数获取类名
- maven - 为多个 Maven 项目配置单个 Jenkins 作业
- php - 如何在网络上编辑 pdf(mysql 数据库和 php)。pdf需要在线编辑,客户端不需要pdf编辑器
- ios - Swift - 如何根据视频播放器框架的大小动态调整 UIView 的大小
- javascript - 字母数字单词的正则表达式以字母开头
- java - 如何转换列表
到地图 > 基于分隔符 - c# - 在 Delegate 世界中难以理解术语
- maven - 如何将 Wildfly bin/client 文件夹中的 jboss-client.jar 包含到我的 maven 项目中?
- sql - 地理问题
- google-apps-script - 如何对部署的 Google App 脚本进行身份验证?