环境:OPM up7
语言:C#
代码:
//Specification string specification = "mEX-OPM"; //Main Width, Height of HVAC Rectangular/Oval component. double mainWidth = 450; double mainHeight = 300; //Main Diameter of HVAC Round component. double mainDiameter = 450; //Length of HVAC Duct component. This is a property of the HVAC component. double ductLength = 2000; DPoint3d origin = new DPoint3d(0, 0, 0); //Take off component with Round duct. HVACRoundDuctComponentData duct3Data = new HVACRoundDuctComponentData(specification, mainDiameter); duct3Data.SetProperty("LENGTH", ductLength.ToString()); HVACRoundDuctComponent duct3 = new HVACRoundDuctComponent(origin, duct3Data, 0, DrawingView.ViewTop, true); duct3.Create(); origin.X = 1000; HVACRoundTakeOffComponentData takeoff3Data = new HVACRoundTakeOffComponentData(specification, mainDiameter); HVACRoundTakeOffComponent takeoff3 = new HVACRoundTakeOffComponent(origin, takeoff3Data, 0, DrawingView.ViewTop, true); takeoff3.AddComponentToBranch(duct3); takeoff3.Create();
如图所示,使用opm sdk生成接头,发现BRANCH_PORT位置飘了很远,连接性也断开了,请问这种情况是使用方式不对还是bug
我观察到,如果拖动Takeoff靠下的夹点,那么BRANCH_PORT会跟着移动并且更新为一个正常值,所以这个可能是个bug,PlacementTool更新了这个坐标,而API没有更新。
武老师,有没有比较好的解决办法,我现在尝试自己对BMECObject添加PORT,这样连接性会有一些问题
目前沒有。
我已经提交了bug报告,预计下一个Update修复。
在界面直接修改坐标会导致BRANCH_PORT消失。
修改这个坐标是需要一系列操作的,不是简单一个操作改变值就完成了。
而这个函数是一个C++/CLI 的 internal 的 全局函数,我需要确认一下能否提供给您函数原型以及您能否调用。
Answer Verified By: Liaoyuan Zhang
张工:您好!
请问贵司是否是BDN(Bentley Developer Network)会员?BDN会员可以向Bentley提交对未公开API的申请,如果批复后就能调用这些未公开的API了。有关BDN的详细介绍请看如下文章:
Bentley开发者网络(BDN)介绍
是的,好的,我研究一下如何申请,谢谢符老师
好的,谢谢武老师