|
|
Home | Forums |
Downloads | Gallery |
News & Articles | Resources |
Jobs | FAQ |
| Join |
Welcome !
|
65 Users Online (64 Members):
Show Users Online
- Most ever was 626 - Mon, Jan 12, 2015 at 2:00:17 PM |
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 |
Trying to figure out how to code using VB.NET in Macro Manager and I need HELP!! |
Workflow & Implementation >> API & Third Party Apps
|
Fri, Mar 28, 2014 at 8:16:28 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
|
Cannot grab elements in 2011 using 2010 code |
Workflow & Implementation >> API & Third Party Apps
|
Mon, Jun 21, 2010 at 5:40:27 PM
|
0
|
Macro request |
Workflow & Implementation >> API & Third Party Apps
|
Mon, Jul 19, 2010 at 10:35:00 AM
|
4
|
Things necessary for a Good BIM Leader / Manager |
General Discussion >> Revit Project Management
|
Mon, Feb 22, 2010 at 8:14:39 AM
|
3
|
|
|
Site Stats
Members: | 2057532 | Objects: | 23076 | Forum Posts: | 152250 | Job Listings: | 3 |
|