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.



Leave a Reply

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

You are commenting using your 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 )

Connecting to %s