It looks like there's a couple of things happening here from what I can tell.
First off, the Revit.Geometry namespace is no longer used in Revit 2011. You should only need to reference:
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
Then in the actual code, here's what I used in my VSTA macro:
Code:
public void DrawLine()
{
Document doc = this.Document;
UIApplication app = this.Application;
//Create the Points
double x1 = 5.0;
double y1 = 5.0;
double z = 0.0;
double x2 = 117.0;
double y2 = 115.0;
XYZ point1 = app.Application.Create.NewXYZ(x1, y1, z);
XYZ point2 = app.Application.Create.NewXYZ(x2, y2, z);
//Create line
Line line = app.Application.Create.NewLineBound(point1, point2);
DetailCurve detailCurve = doc.Create.NewDetailCurve(doc.ActiveView, line);
TaskDialog.Show("Done", "Line Created");
}
What you can do is create a new module in VSTA macro manager, then click CreateMacro and call it DrawLine, then just insert the code from above. What this should do, is draw a long line on the active sheet/view (I edited your distances to make it a bit more noticeable, feel free to change it back). The main thing that differs from your code is that I've added the following line:
DetailCurve detailCurve = doc.Create.NewDetailCurve(doc.ActiveView, line);
It's a little confusing, you have to create a Line, which doesn't actually display anything - it's simply a way of representing some Geometry. Then, we tell Revit we want to create a detail line that matches this geometry by creating a 'DetailCurve'.