ordinate Dimensions using sketch points
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I am trying to add Ordinate dimensions using scketch points, my code spits out an "Unspecified error" when I try to use one sketch point as a geometry intent to create origin indicator method in the drawing view. here is some code:
{code}
Dim oDV as DrawingView
Dim oSheet asSheet
Dim oGIntent asGeometryIntent
Dim Sktch asDrawingSketch
Dim sktP assketchPoint
Dim oPt asPoint2d
Dim TG as transientGeometry
oPt := oDV.ModelToDrawingViewSpace(Inv.TransientGeometry.CreatePoint(0,0,0));
Sktch := oDV.Sketches.Add;
Sktch.Edit;
sktP:= Sktch.SketchPoints.Add(oPt,false);
oPt := oDV.ModelToDrawingViewSpace(Inv.TransientGeometry.CreatePoint(100,52.5,0));
sktP:= Sktch.SketchPoints.Add(oPt,false);
sktch.ExitEdit;
oGIntent := oSheet.CreateGeometryIntent(Sktch.SketchPoints.item[1],emptyparam);
oDV.CreateOriginIndicator(oGIntent); // Here is when the error happens
{code}
I also tried to set
sktP.ConnectionPoint:=true;
sktP.InsertionPoint :=true;
but no luck.
I also noticed that the points created are not visible after sktch.ExitEdit, but i don't see a way to make them visible.
Any Ideas?
Thanks,
Mario.