• I created 2 elements and want to connect them in specific ppoint

    DbElement ce = CurrentElement.Element;

                       DbDouble CylH = DbDouble.Create(5000, DbDoubleUnits.AllUnits()[0]);
                       DbDouble CylD = DbDouble.Create(1500, DbDoubleUnits.AllUnits()[0]);

                       DbDouble DishH = DbDouble.Create(400, DbDoubleUnits.AllUnits()[0]);
                       DbDouble DishD = DbDouble.Create(1500, DbDoubleUnits.AllUnits()[0]);
                       DbDouble DishR = DbDouble.Create(1000, DbDoubleUnits.AllUnits()[0]);
                   


                       DbElement Cylinder = ce.Create(3, DbElementTypeInstance.CYLINDER);
                       Cylinder.SetAttribute(DbAttributeInstance.NAME, @"/"+"ABDO");
                       Cylinder.SetAttribute(DbAttributeInstance.DIAM, CylD);
                       //hIGHT
                       Cylinder.SetAttribute(DbAttributeInstance.HEIG, CylH);

                     
                       DbElement Dish = ce.Create(4, DbElementTypeInstance.DISH);
                       Dish.SetAttribute(DbAttributeInstance.NAME, @"/" + "ABDO2");
                       Dish.SetAttribute(DbAttributeInstance.DIAM, DishD);

                       Dish.SetAttribute(DbAttributeInstance.RADI, DishR);
                       Dish.SetAttribute(DbAttributeInstance.HEIG, DishH);

                 
                       CurrentElement.Element = Cylinder;


    I want to do like last line in this Pml

    NEW EQUIP /ABCD
    NEW BOX
    XLEN 300 YLEN 400 ZLEN 600
    NEW CYL DIA 400 HEI 600
    CONN P1 TO P2 OF PREV
  • Hi abdosaleh999[COLOR=#3e3e3e], i don't know how to connect 2 element using c# but u can sent commad [/COLOR]CONN P1 TO P2 OF PRE from c#

    Command pmlCommand = Command.CreateCommand("CONN P1 TO P2 OF PREV");
    pmlCommand.RunInPdms();
  • [QUOTE=Nguyễn Hải Đăng;113420]Hi abdosaleh999[COLOR=#3e3e3e], i don't know how to connect 2 element using c# but u can sent commad [/COLOR]CONN P1 TO P2 OF PRE from c#

    Command pmlCommand = Command.CreateCommand("CONN P1 TO P2 OF PREV");
    pmlCommand.RunInPdms();

    Thanks for your reply
    I did it by your code

    but with one change ,[COLOR=#333333]I put this line before your code[/COLOR]
    [COLOR=#333333]CurrentElement.Element = [/COLOR][COLOR=#333333]Dish [/COLOR][COLOR=#333333];


    [/COLOR]