Announcement

Collapse
No announcement yet.

Create New App Macro, help

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

    Create New App Macro, help

    I am trying to create a new Macro (Revit 2011) by following a sample from AU and I am receiving an error message on the folowing lines:

    Dim baseVec As Autodesk.Revit.Geometry.XYZ = Me.Create.NewXYZ(1.0, 0.0, 0.0)
    Dim upVec As Autodesk.Revit.Geometry.XYZ = Me.Create.NewXYZ(0.0, 0.0, 1.0)
    Dim origin As Autodesk.Revit.Geometry.XYZ = Me.Create.NewXYZ(0.0, 0.0, 0.0)

    The message reads: Type" Autodesk.Revit.Geometry.XYZ" not defined.

    I searched the web for answers but cannot find the key, where do I go from here?

    Patrick

    #2
    There was a major overhaul of the API between 2010 and 2011... looks like the sample code you are using is for 2010.
    the Autodesk.Revit.Geometry namespace does not exist in 2011, use Autodesk.Revit.DB.XYZ instead
    http://krispcad.blogspot.com/

    Comment


      #3
      Originally posted by krispy5 View Post
      There was a major overhaul of the API between 2010 and 2011... looks like the sample code you are using is for 2010.
      the Autodesk.Revit.Geometry namespace does not exist in 2011, use Autodesk.Revit.DB.XYZ instead
      Bit off topic but.

      Welcome Kristian glad you made it over.
      Are you the same "kind person" Kristain who sent me that wonderful little Text align app ?
      A fantastic little tool, thanks again
      Maybe you would like to share this and anything else you have to offer in the API section,if you are him ?
      Last edited by mark b; January 6, 2011, 12:49 AM.
      Mark Balsom

      If it ain't broke, fix it till it is.

      Comment


        #4
        Yes Mark, that's me
        http://krispcad.blogspot.com/

        Comment


          #5
          Hi I wounder if anyone can help me!


          2 things!
          I wonder if you can help. I have a schedule of all of my elements in the model, and I want to put my name to all of those element that I have modeled in Revit. how can I do that in Revit with a macro?
          I normally export the schedule to Excel and fill everything and re-Import it back to the schedule.




          the next one, is a little different, I have to put "0001 to however many element that I have in that shcedule" sometimes I have 50+ element, again, I normally export the schedule and fill in the numbering and re-import back to Revit!
          so,
          1-under the title "Designer" I need to put "My Name"
          2- Under the title "Item Number" put a sequence number starting from "0001" to as many elements that I have in the schedule.!


          is this possible at all?
          I tried everything that i can but i didnt have any luck, but I dont have the programming brain!


          Please help if you can!
          sorry to take up your time and thanks in advance!

          Comment


            #6
            Can you clarify "everything" that you tried? IE: What specifically have you tried, already, that hasnt worked?
            Aaron "selfish AND petulant" Maller |P A R A L L A X T E A M | Practice Technology Implementation
            @Web | @Twitter | @LinkedIn | @Email

            Comment


              #7
              Hi Twiceroadsfool
              ,

              thank you for the reply.
              I tried to write a macro code I couldn't get it to work, and tried recording a macro on excel and tweak it to work in revit, that dint work too!
              I just dont know how to write it..!

              Comment


                #8
                Originally posted by Twiceroadsfool View Post
                Can you clarify "everything" that you tried? IE: What specifically have you tried, already, that hasnt worked?
                this is what My Schedule heading looks like this:
                Family_Name l Family_Type l Object_Size l Building_Code l Location l Created_By l Item_Number



                so,
                1-under the title "Created_By" I need to put "My Name" for all of the objects, 50+ sometimes more...
                2- Under the title "Item_Number" I need to put a sequence number starting from "0001" and finishing with however many elements that I have in the schedule, 50+ sometimes more...

                Last edited by hjaff1; September 8, 2019, 09:10 PM.

                Comment


                  #9
                  Hi - There are some code examples showing how to set parameter values on my blog at https://boostyourbim.wordpress.com/category/parameters/. My online video course on the Revit API at http://bit.ly/revitapi would be a great way to quickly learn the fundamentals and more.
                  Regards
                  Harry

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X