Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
Liaoyuan Zhang

Liaoyuan Zhang

Likes
  • Profile
  • Activity
  • Communities
  • Friends
  • Likes
  • Achievements
  • Bookmarks
  • Blog Posts
  • Questions
  • More
  • Cancel
  • 【MS CE MDL】ExtractElementDescr闪退

    Liaoyuan Zhang
    Liaoyuan Zhang
    mdlCell_getElmDscr(&cellDscrP, NULL, &origin, &scale, true, &rotMat, NULL, 0, 2, false, L"NAME", &(*dgnFilePtr)); if (cellDscrP != NULL) { EditElementHandle eeh1(cellDscrP, true, false, ACTIVEMODEL); eeh1.GetHandler().ConvertTo3d(eeh1, 1); ElementAgenda…
    • Answered
    • 14 days ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: C# API中Element的基本变换矩阵、方向矩阵的具体含义?

    HongQiang Guo
    HongQiang Guo
    Mstn中有几种特定类型的元素(例如单元,弧等)自身保存了一个局部坐标系,一个局部坐标系包含了一个原点,以及三个方向向量。 DTransfrom3d就包含了这部分信息,而DMatrix3d只包含了三个方向向量。所以大部分情况下可以认为是DTransfrom3d包含了DMatrix3d的信息。 MS 学习资源: MicroStation Wednesday 视频分享 深入探讨 MicroStation DGN 基本概念系列 一步步学习MicroStation CE Addin开发 …
    • 4 months ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: [msce c# c++] Element 克隆或者复制

    Yongan.Fu
    Yongan.Fu
    执行ElementDoCopy动作,在CopyContext中有参数控制它复制后不添加到模型中的。
    • over 2 years ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: 工作集提示自动激活

    Yongan.Fu
    Yongan.Fu
    使用如下代码可以跳过这个Workset Warning的对话框: extern "C" void mdlSystem_setBatchProcessingState(BatchProcessing_States state, const WChar*); void OpenFileWithoutWorkSetCheck() { mdlSystem_setBatchProcessingState(PROCESSSTATE_Processing, NULL); mdlSystem_newDesignFile…
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: [MSCE c++] DgnModel的两个概念(loaded和filled的区别是什么)

    HongQiang Guo
    HongQiang Guo
    我的理解是loaded只是加载了Model的信息到内存中,但是Model的内容(主要是包含的各种各样的元素,图形元素,非图形元素)并没有从硬盘中加载到内存,filled就是将这些内容从硬盘里边加载到内存了。
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: 把一个元素删除后,为什么还能获得它的ElementRef?

    Yongan.Fu
    Yongan.Fu
    因为刚删除后只是给被删除元素做了一个删除标记,并未将其从DGN文件中实际移除(这样做的目的是为了提供整体工作效率)。退出DGN文件才会触发压缩功能。 当然,您也可以选菜单File > Compress手动压缩文件。压缩后应该就找不到这些被删除的元素了。 编程的话,可调用mdlSystem_compressDgnFile();
    • over 7 years ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: 【C++/C# MSCE】代码创建元素模板

    Yongan.Fu
    Yongan.Fu
    请参考如下C++样例代码: void elemTempTest(WCharCP unparsed) { //create template by path DgnFileP dgnFile = ISessionMgr::GetActiveDgnFile(); ElementTemplateNodePtr elemTemp = nullptr; if (ETSTATUS_Success != ElementTemplateUtils::CreateByPath(elemTemp…
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: [MSCE U13 c++] placecell 函数存在问题?

    Yongan.Fu
    Yongan.Fu
    我用MS自带的单元库sample2.cel测试,完全没有问题呀。测试代码如下。请对照您的代码哪里写错了。 void mdlCell_placeCellTest() { BeFileName rtnCellLib, inputCellLib(L"C:\\Program Files\\Bentley\\MicroStation CONNECT Edition\\MicroStation\\Default\\Cell\\sample2.cel"); if (SUCCESS != mdlCell_attachLibrary…
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: [MSCE U13 c++] placecell 函数存在问题?

    Yongan.Fu
    Yongan.Fu
    cell有三种类型:Graphic、Point和Parametric。您要放置的这个cell是什么类型的?
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • 一步步学习MicroStation CE Addin开发

    Yongan.Fu
    Yongan.Fu
    第0章、介绍与必备条件 第1章、建立一个最简单的Addin应用程序 第2章、在Addin中创建元素 第3章、运行并调试Addin 第4章、给Addins添加命令 第5章、给Addins添加Windows窗体 第6章、用DgnPrimitiveTool和DgnElementSetTool实现交互式命令 第7章、响应MicroStation事件 第8章、在Addins中调用C/C++函数 第9章、用C++/CLI编写Addins
    • 7 months ago
    • 中国BDN社区
    • 中国BDN社区-威客
    • windson xiao
    • F T
  • RE: [MSCE C++/C#]文字拉伸

    HongQiang Guo
    HongQiang Guo
    有个更简便的方法,通过EC的方式设置其Thickness属性
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: 同时参考多个Saved View如何判断元素来源哪个Saved View?

    HongQiang Guo
    HongQiang Guo
    拿到元素的EditElementHandle以后,如下所示的方法去判断: DgnAttachmentP dgnAtta = dynamic_cast<DgnAttachmentP>(eeh.GetDgnModelP()); if (dgnAtta) { } MS学习资源: MicroStation Wednesday 视频分享 深入探讨 MicroStation DGN 基本概念系列 一步步学习MicroStation CE Addin开发 一步步学习MicroStation…
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: 请问有DisplaySet的使用示例吗?

    HongQiang Guo
    HongQiang Guo
    以下代码是把选中的元素从 DisplaySet中移除,即隐藏选中的元素,供参考: ViewportP vpActive = IViewManager::GetActiveViewSet().GetSelectedViewport(); mdlView_setDisplayControl(VIEWCONTROL_DISPLAYSET, vpActive->GetViewNumber(), true); mdlDisplaySet_addSelectionSet(false); mdlDisplaySet_removeSelectionSet…
    • over 4 years ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: [OPM U6 C#]如何添加relationship

    HongQiang Guo
    HongQiang Guo
    如下实例代码供您参考: FindInstancesScope scopeTemp = FindInstancesScope.CreateScope(Session.Instance.GetActiveDgnFile(), new FindInstancesScopeOption()); int verMaj = 0, verMin = 0; IECSchema mySchema = DgnECManager.Manager.LocateSchemaInScope(scopeTemp,…
    • over 1 year ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
  • RE: 参考modal

    HongQiang Guo
    HongQiang Guo
    Point3d vectorX = msApp.Point3dFromXYZ(0, 1, 0); Point3d vectorY = msApp.Point3dFromXYZ(-1, 0, 0); Point3d vectorZ = msApp.Point3dFromXYZ(0, 0, 1); Matrix3d matrix = msApp.Matrix3dFromPoint3dColumns(vectorX, vectorY, vectorZ); Point3d pt = msApp…
    • over 6 years ago
    • Bentley 中国优先社区
    • ◆ 二次开发(MicroStation编程, ProjectWise编程等)
    • Andy
>
Communities
  • Home
  • Getting Started
  • Community Central
  • Products
  • Support
  • Secure File Upload
  • Feedback
Support and Services
  • Home
  • Product Support
  • Downloads
  • Subscription Services Portal
Training and Learning
  • Home
  • About Bentley Institute
  • My Learning History
  • Reference Books
Social Media
  •    LinkedIn
  •    Facebook
  •    Twitter
  •    YouTube
  •    RSS Feed
  •    Email

© 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies