RevitCity.com Logo

Home  |  Forums  |  Downloads  |  Gallery  |  News & Articles  |  Resources  |  Jobs  |  FAQ  |  SearchSearch  |  Join  |  LoginLogin

Welcome !

92 Users Online (90 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

Search this ThreadSearch this Thread | Page 1 of 1 |

Wed, Jan 19, 2011 at 10:53:22 AM | Macro Manager does not like code

#1

davidr


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

 

Wed, Jan 19, 2011 at 10:58:48 AM | Macro Manager does not like code

#2

davidr


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

 

Wed, Jan 19, 2011 at 11:01:59 AM | Macro Manager does not like code

#3

davidr


active

Joined: Thu, May 26, 2005
26 Posts
No Rating


ok..so i have attached a file with the code in it-happy trails

Attached Files

This user is offline

 

Sat, Mar 12, 2011 at 10:36:04 PM | Macro Manager does not like code

#4

paulh


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

 

Tue, Mar 15, 2011 at 1:24:54 PM | Macro Manager does not like code

#5

davidr


active

Joined: Thu, May 26, 2005
26 Posts
No Rating


no it doesn't thats the wierd thing about it...

This user is offline

 

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

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:

1989574

Objects:

22877

Forum Posts:

152179

Job Listings:

3

Sponsored Ads

Home | Forums | Downloads | Gallery | News & Articles | Resources | Jobs | Search | Advertise | About RevitCity.com | Link To Us | Site Map | Member List | Firm List | Contact Us

Copyright 2003-2010 Pierced Media LC, a design company. All Rights Reserved.

Page generation time: 0.2989

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights