Search the Community
Showing results for tags 'stretch points'.
-
I have been trying to figure this out for the past couple of days with no luck. In the editor I am able to select a polar grip from a dynamic block and place it where needed, it updates stretch and angle for custom properties on the dynamic block. I am looking for a way to do the equivalent in C#. This is what I have tried so far public void MoveGrip(Point3d gripPoint, Vector3d offset) { Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Transaction tr = db.TransactionManager.StartTransaction(); using (tr) { BlockReference br = null; Entity ent = (Entity)tr.GetObject(_oBlockRefId, OpenMode.ForWrite); br = ent as BlockReference; if(br != null) { GripDataCollection grips = new GripDataCollection(); GripDataCollection updateGrip = new GripDataCollection(); double curViewUnitSize = 0; int gripSize = 0; Vector3d curViewDir = doc.Editor.GetCurrentView().ViewDirection; GetGripPointsFlags bitFlags = GetGripPointsFlags.GripPointsOnly; br.GetGripPoints(grips, curViewUnitSize, gripSize, curViewDir, bitFlags); foreach (GripData grip in grips) { if (grip.GripPoint == gripPoint) { updateGrip.Add(grip); } } br.MoveGripPointsAt(updateGrip, offset, MoveGripPointsFlags.Polar); } } } It does collect points, and match with the point passed in(as I know know other way to specify what point I want to move). But when it tries to execute MoveGripPoibtsAt nothing is changed, and no exceptions are thrown that I am aware of. I have also spent a couple of days trying to find documentation for this, with no luck. Where the hell is the api documentation for autocad 2013? I keep finding stuff for civil and others, but nothing for autocad. This is immensely frustrating.