在Autocad Plant 3d中创建设备

时间:2016-02-23 11:22:13

标签: c# 3d autocad

我想在autocad plant 3d中从预定义的形状创建设备。 我从附加的代码中检索形状和相关参数。

            using (EquipmentHelper eqHelper = new EquipmentHelper())
            {                    
                PromptEntityResult res = ed.GetEntity("\nSelect equipment entity: ");
                ObjectId eqId = res.ObjectId;;
                EquipmentType eq = eqHelper.RetrieveEquipmentFromInstance(eqId);
                foreach (CategoryInfo equipmentComponent in eq.Categories)
                {              
                    ed.WriteMessage("\n" + equipmentComponent.DisplayName);
                    foreach (ParameterInfo item in equipmentComponent.Parameters)
                    {
                        ed.WriteMessage("\n\t" + item.Name + ";" + item.Value);
                    }                        
                }
             }

1 个答案:

答案 0 :(得分:0)

您可能需要一个自定义Python脚本,请查看本教程:Custom Python Scripts for AutoCAD Plant 3D – Part 1(并按照后续部分)