+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Forum Newbie
    Using
    AutoCAD 2011
    Join Date
    Dec 2011
    Posts
    3

    Default COMPILE ERROR IN HIDDEN MODULE: MAINWIN (macro)

    Registered forum members do not see this ad.

    Hello,

    A macro was written (.dvb) for changing our company title blocks and block data. It seems to work perfectly on the Windows 7 (Autocad 2011) computer it was written on but when trying to run it on our older XP (Autocad 2011) computers or other Windows 7 computers we get the following error: (COMPILE ERROR IN HIDDEN MODULE: MAINWIN).

    This happens at the point in which It is suppose to compile the list of files contained within the folder it (in the field box) it is directed too.

    That particular piece of code, the part that compiles the list of file names in the directory, places it into a list that you can pick and choose which files are to be manipulated, was copied from a working batch plot macro and it works fine in that plot program on all version of windows and autocad.

    Has anyone got any ideas as to what may be going on here or what I may be looking for ?
    Last edited by XCrossWindsX; 2nd Feb 2012 at 09:17 pm.

  2. #2
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,791

    Default

    Can you open it in VBAman if so export it out and recreate on the computer it doesn't work on re save as say ver 2 you may need to find lowest common denominator.
    A man who never made mistakes never made anything

  3. #3
    Forum Deity BlackBox's Avatar
    Using
    Civil 3D 2011
    Join Date
    Nov 2009
    Posts
    3,952

    Default

    I'm no VBA expert, but I believe that one must compile a different version for each 32-Bit and 64-Bit environments (as Al has suggested).

    HTH
    "Potential has a shelf life." - Margaret Atwood

  4. #4
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2011
    Posts
    1

    AutoCAD Compile error in hidden module

    Registered forum members do not see this ad.

    Quote Originally Posted by BIGAL View Post
    Can you open it in VBAman if so export it out and recreate on the computer it doesn't work on re save as say ver 2 you may need to find lowest common denominator.
    If it's true that you can see the code in the vbaeditor, follow the next:
    In the "Project Explorer" you rightclick on a module and choose "Export file..." and save it, do this for each of the modules, forms and classes.

    Then you go to acad, click in the menu "Tools -> macro -> VBA manager". Here you click on the "New" button.
    As you can see there is a new project "ACADPoject".
    At the bottom of this window you find the button "Visual Basic Editor"
    Now as you did with exporting all this, you have to import all at the same way:
    Rightclick and then "Import file..."

    For "Thisdrawing", you saved it as a class, when you import this one it wil be a classmodule ->> copy all code and paste it in the Thisdrawing (doubleclick it).

    I hope this wil help you.
    Let us know if it is.

Similar Threads

  1. compile in winxp for win7
    By metaldan in forum .NET, ObjectARX & VBA
    Replies: 0
    Last Post: 14th Oct 2011, 11:41 pm
  2. Error Heidi Module Load Error
    By ikaross in forum Map 3D
    Replies: 2
    Last Post: 12th Aug 2009, 10:53 am
  3. Compile error
    By JONTHEPOPE in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 5th Mar 2009, 08:33 pm
  4. Recorded Macro error
    By Byron md in forum SolidWorks
    Replies: 1
    Last Post: 13th Feb 2009, 03:21 pm
  5. Compile dvb files
    By LYC in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 16th Feb 2008, 07:41 am

Bookmarks

Posting Permissions

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