Results 1 to 6 of 6

Thread: VBA Excel Reference Library

  1. #1
    Member
    Join Date
    2012-06
    Posts
    3
    Login to Give a bone
    0

    Default VBA Excel Reference Library

    I have written a macro that works in a certain assembly, 178537.iam, and have written the macro under the DocumentProject-Modules-Functions. I have the macro pull cell data from an excel file and put it into the iProperties, and want to make this macro work in the ApplicationProject-Modules-Module1 so that it will be available across any file that I open in Inventor, and eventually make it available to the whole company to use. I have checked the box in Microsoft Excel 12.0 Object Library in the Tools-References tab, but this is not available in the ApplicationProject-Modules-Module1. Only the Microsoft Excel 5.0 Object Library is available here, which is a .OLB file, not a .EXE file like the 12.0 is. It seems like I have tried everything to make this macro available to any part or assembly, but can't seem to get it. I apologize if this is confusing, I'm pretty confused myself, but if anyone has any advice it would be greatly appreciated.

    Thanks,
    Mike

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: VBA Excel Reference Library

    I don't have IV, so let me ask a couple questions? Are DocumentProject and ApplicationProject separate project files? Are the projects embedded or in their own files?
    C:> ED WORKING....

  3. #3
    Member
    Join Date
    2012-06
    Posts
    3
    Login to Give a bone
    0

    Default Re: VBA Excel Reference Library

    This is what my projecct tree looks like. Right now the code that works is located in the Functions (highlighted in gray) that has the Microsoft Excel 12.0 Object Library. When I copy the code to Module1 under ApplicationProject, it doesn't work because the only reference I can get it Microsoft Excel 5.0 Object Library which isn't a .exe. And I believe the DocumentProject is embedded, and the ApplicationProject is it's own file, but I'm not positive on that (I'm a newbie to this kind of).

    Thanks,
    Mike

    PROJECT TREE.JPG

  4. #4
    Member
    Join Date
    2012-06
    Posts
    3
    Login to Give a bone
    0

    Default Re: VBA Excel Reference Library

    Wow do I feel stupid, all I had to do was uncheck the Microsoft Excel 5.0 Object Library and then the 12.0 popped up in the References. So I got it all working now, thanks for the reply!

  5. #5
    Member
    Join Date
    2016-02
    Posts
    2
    Login to Give a bone
    0

    Default Re: VBA Excel Reference Library

    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 Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: VBA Excel Reference Library

    To my knowledge, Revit doesn't use VBA, so no this isn't possible. The only option is to program it in .NET. However, from what you say, I think that it's too difficult for you if you don't have a background in programming. You would have to hire a developer. You can ask in the Revit API forum.
    https://forums.augi.com/forumdisplay.php?218-Revit-API
    C:> ED WORKING....

Similar Threads

  1. Reference Library
    By LSElite in forum Dynamic Blocks - Sharing
    Replies: 3
    Last Post: 2014-12-05, 02:18 AM
  2. Use EXCEL VBA to load AutoCAD reference files
    By bob_kat in forum VBA/COM Interop
    Replies: 5
    Last Post: 2014-08-29, 05:35 PM
  3. Cannot remove Excel spreadsheet reference 2008
    By pmedina in forum AutoCAD General
    Replies: 8
    Last Post: 2008-04-22, 05:12 AM
  4. Replies: 0
    Last Post: 2006-05-16, 06:13 PM
  5. Editing the reference keynote library
    By psmith73426 in forum ACA General
    Replies: 0
    Last Post: 2004-08-31, 08:35 PM

Posting Permissions

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