コード例 #1
0
        static void Main(string[] args)
        {
            var connection = new Picker()
                             .PickObject(Picker.PickObjectEnum.PICK_ONE_OBJECT) as Connection;

            if (connection == null)
            {
                return;
            }

            var children = GetModelObjectsAsList(connection.GetChildren());

            var drawer = new GraphicsDrawer();
            var color  = new Color(0, 1, 1);

            children.ForEach(c =>
            {
                var part     = c as Part;
                var location = part?.GetCenterLine(false)[0] as Point;
                var partMark = part?.GetPartMark();
                drawer.DrawText(location, partMark, color);
            });
        }