Bentley Communities
Site
Search
User
Site
Search
User
Welcome
Products
Support
About
More
Cancel
Xiang Liu
Likes
Profile
Activity
Communities
Friends
Likes
Achievements
Bookmarks
Blog Posts
Questions
More
Cancel
RE: 【ORD C++】XAttribute问题
Xiaoqi Zhang
你直接给我发邮件吧xiaoqi.zhang@bentley.com,把你的模型给我发下,注明dgn哪个是参考的,你想把xattribute写到哪个dgn里。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: 【ORD C++】XAttribute问题
Xiaoqi Zhang
给您完整的代码吧 : WString strDgn("D:\\test.dgn"); DgnDocumentPtr pDgnDoc = DgnDocument::CreateForLocalFile(strDgn.GetWCharCP()); DgnFilePtr pDgn = DgnFile::Create(*pDgnDoc, DgnFileOpenMode::ReadWrite); StatusInt openForWriteStatus; pDgn->LoadDgnFile…
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: 【OBD C++】面与实体做布尔差集失败
HongQiang Guo
用SolidUtil下的函数: ElementAgenda selectset; SelectionSetManager::GetManager().BuildAgenda(selectset); if (selectset.GetCount() < 2) { return; } EditElementHandle& eeh1 = selectset[0]; EditElementHandle& eeh2 = selectset[1]; ISolidKernelEntityPtr…
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: 【ABD C++】给TFForm绘制的圆柱掏空后通过mdlTFFormRecipe_getElmDscr必现获取不到元素描述符
Xiang Liu
好的,我使用其他方式mdlTFFormRecipePathList,通过路径扫描出来了。使用这个方式时, mdlTFFormRecipe_synchronize能成功,mdlTFFormRecipe_getElmDscr也能获取到元素。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: [MSCE C++] 复杂链提取顶点问题
HongQiang Guo
如果对元素描述符(MSElementDescr)、元素(MSElement)这两个结构体的用法及Mstn对元素管理的工作原理不熟悉的话,最好不要直接通过这两个结构体获取元素属性,用MSTN CE SDK封装的CurveVector、CurvePrimitive去提取元素的线性几何数据是最稳定的做法,通过ICurvePathQuery可以获取到元素的CurveVector对象实例,详细用法可以搜一下以前的帖子查看一下
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: [MSCE C++]修改当前视图显示样式问题
Xiaoqi Zhang
您的代码没问题,如果为空,说明当前视图没有显示样式。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: [MSCE C++]修改当前视图显示样式问题
Yongan.Fu
SDK中带有例子C:\Program Files\Bentley\MicroStationCONNECTSDK\examples\View\ViewInfoExample 执行后可获得DisplayStyle名称如下:
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: [MSCE C++]修改当前视图显示样式问题
HongQiang Guo
您修改一下视图的显示样式然后再执行看一下
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: OBD C++ 使用mdlTFFormRecipe_getElmDscr偶尔获取不到元素描述符
Youli Bai
需要先调用 mdlTFFormRecipe_synchronize,你的代码里是在这之后调用的。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: OBD SDK mdlTFFormRecipeFreeList_free 再次绘制图形释放崩溃,首次不崩溃
Yongan.Fu
在C/C++中使用指针的标准方式是: ①声明指针时赋以空值;如: TFFormRecipeFreeList *pRecipeFreeList = NULL; ②对该指针赋值,如:pRecipeFreeList = mdlTFFormRecipeFreeList_construct(); ③正常使用指针; ④释放指针(需要先判断是否为空,释放后要再次 赋以空值 )。如: if (NULL != pRecipeFreeList) { mdlTFFormRecipeFreeList_free…
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: SmartSolid怎么转成OBD中的墙和板
Yongan.Fu
没有好的办法转换。OBD中的墙和板实质上是Cell,Cell中由多个Shape组成每个面的。而SmartSolid把整个体当做一个对象看待的。您需要调用OBD SDK来创建墙和板才可以。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: 曲面拉伸一个厚度不成功
Yongan.Fu
请改用更直接的SolidUtil::Modify::ThickenSheet函数。 mdlSolid_xxx类函数比较底层,涉及到许多设计模型到ParaSolid模型的转换问题,尽量避免去调用它们。比如,如果要调用mdlSolid_thickenSheetBody的话,你的1000这个值就需要在两个空间中去转换,而不能直接拿来就用。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: SolidHandler::CreateProjectionElement使用问题,请老师帮忙讲解一下
HongQiang Guo
我用如下代码测试试能生成的,结果如下图所示: ElementAgenda selectset; SelectionSetManager::GetManager().BuildAgenda(selectset); if (!selectset.GetCount()) { return; } EditElementHandleR eeh= selectset[0]; EditElementHandle eehFloor; DPoint3d origin = DPoint3d…
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: SolidHandler::CreateProjectionElement使用问题,请老师帮忙讲解一下
Yongan.Fu
请测试如下代码: void solidCreateTest3() { ElementHandle profileEH(743781L, ACTIVEMODEL); DPoint3d origin, normal, defaultNormal = DPoint3d::From(0, 0, 1); mdlElmdscr_extractNormal(&normal, &origin, profileEH.GetElementDescrCP(), &defaultNormal); DVec3d…
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
RE: 'mt.exe' 不是内部或外部命令,也不是可运行的程序或批处理文件。
Xiaoqi Zhang
感觉您的VS出现了问题,建议卸载后重新安装专业版。
over 3 years ago
Bentley 中国优先社区
◆ 二次开发(MicroStation编程, ProjectWise编程等)
>