Results 1 to 9 of 9

Thread: Create New App Macro, help

  1. #1
    Member
    Join Date
    December 9, 2010
    Posts
    74
    Current Local Time
    06:08 AM

    Not allowed! Not allowed!

    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. #2
    Member krispy5's Avatar
    Join Date
    December 22, 2010
    Posts
    68
    Current Local Time
    10:08 PM

    Not allowed! Not allowed!
    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

  3. #3
    Moderator mark b's Avatar
    Join Date
    December 7, 2010
    Location
    NSW Australia
    Posts
    1,434
    Current Local Time
    10:08 PM

    Not allowed! Not allowed!
    Quote 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 6th, 2011 at 01:49 AM.

  4. #4
    Member krispy5's Avatar
    Join Date
    December 22, 2010
    Posts
    68
    Current Local Time
    10:08 PM

    Not allowed! Not allowed!
    Yes Mark, that's me

  5. #5
    New Member hjaff1's Avatar
    Join Date
    September 14, 2017
    Posts
    3
    Current Local Time
    12:08 PM

    Not allowed! Not allowed!
    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!

  6. #6
    Administrator Twiceroadsfool's Avatar
    Join Date
    December 7, 2010
    Location
    Dallas, TX
    Posts
    10,790
    Current Local Time
    05:08 AM

    Not allowed! Not allowed!
    Can you clarify "everything" that you tried? IE: What specifically have you tried, already, that hasnt worked?

  7. #7
    New Member hjaff1's Avatar
    Join Date
    September 14, 2017
    Posts
    3
    Current Local Time
    12:08 PM

    Not allowed! Not allowed!
    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..!


  8. #8
    New Member hjaff1's Avatar
    Join Date
    September 14, 2017
    Posts
    3
    Current Local Time
    12:08 PM

    Not allowed! Not allowed!
    Quote 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 8th, 2019 at 10:10 PM.

  9. #9
    Junior Member
    Join Date
    February 16, 2013
    Posts
    6
    Current Local Time
    07:08 AM

    Not allowed! Not allowed!
    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

Similar Threads

  1. Create a family warning
    By Drew in forum Architecture - Family Creation
    Replies: 10
    Last Post: May 31st, 2011, 05:34 PM
  2. WORK FOCUS cool app
    By gaby424 in forum Out There
    Replies: 5
    Last Post: May 12th, 2011, 02:56 PM
  3. How to create 2d truss?
    By pjetrus in forum Architecture and General Revit Questions
    Replies: 6
    Last Post: April 2nd, 2011, 04:58 AM
  4. Export Families App
    By mark b in forum Third party Add-Ins, API and R&D
    Replies: 0
    Last Post: February 28th, 2011, 02:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •