ADT2004 and 2005 conflict

Discussion in 'AutoCAD' started by terencechatfielduk, Sep 16, 2004.

  1. My office is in the process of starting to migrate to 2005 from 2004, and I'm finding some errors occuring that defy explanation. A code statement that has worked fine in 2004, after installation of 2005 starts playing up. An example is a line of code like this:

    Public Sub ChangeProfile()
    Dim preferences As AcadPreferences
    Set preferences = ThisDrawing.Application.preferences
    ' Change to a vaild Profile name
    preferences.Profiles.ActiveProfile = "MyProfile"
    End Sub

    The code works Ok most of the time, then fails at the application, so I can't set the preferences object. It only works if I do the full statement like this: ThisDrawing.Application.Preferences.Profiles.ActiveProfile="MyProfile"

    Is there any reason for this? Its a bugger to deal with as there is apparently no reason for it and how would I test for it anyway?
     
    terencechatfielduk, Sep 16, 2004
    #1
  2. Wrong group, dude.

    This is for AutoLisp only.
     
    Nick_Merchant, Sep 16, 2004
    #2
  3. Dang. Guess I'll have to repost.
     
    terencechatfielduk, Sep 16, 2004
    #3
  4. terencechatfielduk

    TCEBob Guest

    The group name is .customization. To me that means any customization query,
    lisp, VBA, C, linetypes, Hatches, Menus etc. Everything that the "Help" system
    lists under "Customization." If I am in error I pray the powers to rename the
    group and set up another for all unlisp questions.

    rs
     
    TCEBob, Sep 16, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.