RevitCity.com Logo

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

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

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

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

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: 1.0512

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights