Exemple #1
-1
        public void getSubElement_geo()
        {
            UIDocument uiDoc = this.ActiveUIDocument;

            Document doc = uiDoc.Document;

            View myView = doc.ActiveView;

            Reference myRef = uiDoc.Selection.PickObject(ObjectType.Element, "Pick a rebar...");

            Rebar myRebar = doc.GetElement(myRef) as Rebar;

            TaskDialog.Show("abc", "Has: " + myRebar.NumberOfBarPositions.ToString());

            ReferenceArray myRefAr = new ReferenceArray();



            TaskDialog.Show("abc", myRebar.IsRebarInSection(myView).ToString());

//
//			setCurrentViewAsWorkPlan();
//
//			XYZ myDimPoint_1 = uiDoc.Selection.PickPoint("Pick Point To Place Dimension....");
//			XYZ myDimPoint_2 = new XYZ(myDimPoint_1.X+5, myDimPoint_1.Y, myDimPoint_1.Z);
//			Line dimLine = Line.CreateBound(myDimPoint_1, myDimPoint_2);
//
//
//			using(Transaction trans = new Transaction(doc, "Create linear Dimension"))
//			{
//				trans.Start();
//				Dimension myDim = doc.Create.NewDimension(doc.ActiveView, dimLine, myRefAr);
//				trans.Commit();
//			}
        }