Keep those macro names unique

If you try to create a macro named “Line” the result will be an error like:
‘ThisApplication.Line()’ is a ‘method’, which is not valid in the given context (CS0119)”

The red squiggly line indicating the error is misleading. The problem here is not really on line 38. The problem is that the name of your macro defines a method called Line which does not have a CreateBound method. Then the compiler gets confused when you try to call the CreateBound method on the Autodesk.Revit.DB.Line class.

So keep those macro names unique to avoid this problem. Renaming the macro to Line1, LineTest, or anything like that will solve the problem.

Capture

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s