Revit二开–管线分布 功能解密
唐僧解瓦 项目 github地址:https://github.com/binbinstrong/tangsengjiewa

本案例以 按管中心排列的方式 来用代码实现 ,按管外壁的原理是一样的在此不做赘述。
本例以 esc 键 来结束选择 如果要实现上图效果可以在 一键分布按钮里面 向revit主窗口发送esc按键即可,时间有限不再多说,好了上代码!
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
[Journaling(JournalingMode.UsingCommandData)]
class Cmd_MepCurveRank : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIApplication uiapp = commandData.Application;
UIDocument uidoc = commandData.Application.ActiveUIDocument;
Document doc = uidoc.Document;
Selection sel = uidoc.Selection;
View acview = uidoc.ActiveView;
var toolwin = MepcurveRank.Instance;
toolwin.helper().Owner = RevitWindowHelper.GetRevitHandle();
toolwin.Show(); //显示窗体 当点击窗体的 一键分布的时候 向revit窗体发送esc按键 结束 while循环

最低0.47元/天 解锁文章
696

被折叠的 条评论
为什么被折叠?



