|
|
|
Home | Forums |
Downloads | Gallery |
News & Articles | Resources |
Jobs | FAQ |
| Join |
Welcome !
|
446 Users Online (23 Members):
Show Users Online
- Most ever was 3914 - Wed, Aug 26, 2026 at 4:53:14 AM |
Forums
|
Forums >> Workflow & Implementation >> API & Third Party Apps >> Macro Manager does not like code
|
|
|
active
Joined: Thu, May 26, 2005
26 Posts No Rating |
Below i have included some code that i wrote that basically just draws a line on a plot sheet. It's a test run for another macro that i am trying to code. When i save it with F5 (debugger) nothing comes up and it seems ok. When i get out and try to Run it with Macro Manager, the Run button is deactivated. I know it does not like something in the code but I don't know what?? I am running 2011 on windows xp pro 64. Any ideas would be appreciated. Partial code: using Autodesk.Revit.DB;using Autodesk.Revit.UI;using Autodesk.Revit.Creation;using XYZ = Autodesk.Revit.Geometry.XYZ;using LINE = Autodesk.Revit.Geometry.Line; UIAPPLICATION app = m_doc.Application; //declare variables double x1 = (5.0); double y1 = (5.0); double z = (0.0); double x2 = (7.0); double y2 = (5.0); //create object XYZ point1 = app.Application.Create.NewXYZ(x1, y1, z); //takes doubles XYZ point2 = app.Application.Create.NewXYZ(x2, y2, z); //Create Line LINE line = app.Application.Create.NewLineBound(point1, point2);
|
This user is offline |
|
 | |
|
|
active
Joined: Thu, May 26, 2005
26 Posts No Rating |
sorry about the formatting lets hope this works: using XYZ = Autodesk.Revit.Geometry.XYZ;using LINE = Autodesk.Revit.Geometry.Line;UIAPPLICATION app = m_doc.Application;//declare variablesdouble x1 = (5.0);double y1 = (5.0);double z = (0.0);double x2 = (7.0);double y2 = (5.0); //create objectXYZ point1 = app.Application.Create.NewXYZ(x1, y1, z); //takes doublesXYZ point2 = app.Application.Create.NewXYZ(x2, y2, z);//Create LineLINE line = app.Application.Create.NewLineBound(point1, point2);
|
This user is offline |
|
 |
|
active
Joined: Thu, May 26, 2005
26 Posts No Rating |
ok..so i have attached a file with the code in it-happy trails
|
This user is offline |
|
 |
|
active
Joined: Tue, Sep 13, 2005
51 Posts No Rating |
The code doesn't look properly formatted to me. Does it compile without errors?
|
This user is offline |
|
 |
|
active
Joined: Thu, May 26, 2005
26 Posts No Rating |
no it doesn't thats the wierd thing about it...
|
This user is offline |
|
 |
 |
Similar Threads |
|
RevitCity.com chat.. INSIDE OF REVIT! |
Workflow & Implementation >> API & Third Party Apps
|
Wed, Oct 19, 2011 at 2:50:01 PM
|
0
|
|
Need help with Macro program for point cloud visibility |
Workflow & Implementation >> API & Third Party Apps
|
Tue, Apr 25, 2017 at 4:07:38 PM
|
6
|
|
Keynotes, assembly codes or material tags |
Community >> The Studio
|
Thu, Aug 4, 2011 at 6:29:04 PM
|
1
|
|
Macro request |
Workflow & Implementation >> API & Third Party Apps
|
Mon, Jul 19, 2010 at 10:35:00 AM
|
4
|
|
Revit Architecture 2009 "failed to initialize" |
Revit Building >> Technical Support
|
Wed, May 20, 2009 at 3:08:21 PM
|
1
|
 |
|
Site Stats
Members: | 2188074 | Objects: | 23399 | Forum Posts: | 152455 | Job Listings: | 0 |
|