Announcement

Collapse
No announcement yet.

Macro Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Macro Error

    Hi, I'm pretty sure this is the appropriate place to post this question. I'm also pretty new to working with macros but I just can't ignore how much time they would save me anymore.

    I am trying to copy code from The Revit Coaster blog and keep getting the following error;

    Error CS1061: 'DeleteViews.Thisdocument' does not contain a definition for 'ActiveUIDocument' and no extension method 'ActiveUIDocument' accepting a first argument of type 'DeleteViews.ThisDocument' could be found.

    "DeleteViews" is the name of the macro, it's written in C#. I can find ThisDocument being used in other macros, and I'm confused as to what 'ActiveUIDocument' is referring to as well.

    I've scoured forums and google looking for an answer, and while I bet it's very simple, I can't find it (that might be why I can't find it...)

    Thanks!

    #2
    It may be that you created a Document macro & are trying to use code for an Application macro (or vice versa).

    Comment


      #3
      That worked! I've been trying to get this work for almost a month now! Thanks so much!

      Although I don't entirely understand why that worked. What made you think it was an application macro rather than a program macro?

      Comment

      Related Topics

      Collapse

      Working...
      X