Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: GetObject

  1. #11
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Cool Re: GetObject

    Why don't you give the attached a try? Donations are gratefully accepted.
    Attached Files Attached Files

  2. #12
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: GetObject

    Robert,
    Thanks for all your help!
    After searching acad discussions I was able to find a post that clarified the error of my ways.
    I was not aware of the differences between setting a profile current and launching a profile from the icon.

    I still am not sure what to do about this problem since our acad profile forces SDI mode for our techs.
    After further testing of this problem on my system, I realize that this problem only occurs after opening drawings in both acad and LDD and saving work.

    The profile only overwrites after reopening acad.

  3. #13
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: GetObject

    Quote Originally Posted by rad.77676
    I still am not sure what to do about this problem since our acad profile forces SDI mode for our techs.
    After further testing of this problem on my system, I realize that this problem only occurs after opening drawings in both acad and LDD and saving work.

    The profile only overwrites after reopening acad.
    Did you try the script/icon I posted in this thread?

  4. #14
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: GetObject

    Robert,
    Thanks for the script, I'll give it a go.
    I'm guessing I will have to tweak it a bit for acad version and file location?

  5. #15
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: GetObject

    Robert,
    This works if acad is open, but get an error if not.

    These are the changes I made.

    ' Change the location below as needed for the correct location of Acad.exe
    aShell.CurrentDirectory = "\\Vncvr1\D\Ldd\"

    ' Change the profile location/filename as required
    aShell.Run ("\\vncvr1\d\ldd\acad.exe /p \\Vncvr2\e\cadd\system\ldd3_van.arg")

    C:\WINDOWS\system32\wscript.exe "F:\users\rad\Downloads\LaunchAutoCAD.vbs"

    I cannot saveas a .vbs, only .dvb any suggestions?

    Thanx for all your help!
    Rob

  6. #16
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: GetObject

    What is the error? I don't get one here in that circumstance.

    .VBS files can be edited in Notepad; they are plain text files.

    Is the Acad.exe truely located on the server?! You don't have the .exe local on each computer?

  7. #17
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: GetObject

    Robert,
    I reset paths and run script, autocad opens, profile tries to load but with the following errors. It looks like LDD has loaded, but only a partial load.

    The following is from textscreen after startup:
    AutoCAD Express Tools Copyright © 2000 Autodesk, Inc.

    AutoCAD menu utilities loaded.
    Loading AecBase...
    Loading AecUiBase...
    Loading AecUtilities...
    Loading AecCivilBase...
    Loading AecDraft...
    Loading AecLS...
    Error opening PP message file!
    Error opening ZQ message file!
    Loading AecCivilApp...
    Unable to load message files.
    Initializing...; error: ADS request error

  8. #18
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: GetObject

    Quote Originally Posted by rad.77676
    I reset paths and run script, autocad opens, profile tries to load but with the following errors. It looks like LDD has loaded, but only a partial load.
    ...
    Error opening PP message file!
    Error opening ZQ message file!
    Loading AecCivilApp...
    Unable to load message files.
    Initializing...; error: ADS request error
    Thanks for the added info. That helps, in a way. At least we know the script isn't really at fault. Once again, I don't have LDD, so I'm limited in the advice I can offer.

    Look at the properties of your LDD icon. Where is the Startup Location? Are there any other parameters other than the profile switch (/P)?

  9. #19
    I could stop if I wanted to
    Join Date
    2004-11
    Location
    Somewhere close to hell
    Posts
    228
    Login to Give a bone
    0

    Default Re: GetObject

    Robert,
    The icon is pathed as follows:

    \\Vncvr1\d\ldd\acad.exe /p "Vncvr2\e\cadd\system\ldd3_van.arg"

    In order for it to work in the script I had to change it to:

    "\\Vncvr1\d\ldd\acad.exe /p \\Vncvr2\e\cadd\system\ldd3_van.arg"

    I put together a DOS batch file prior to your script and this is the same problem that I ran into with trying to use the /p switch in DOS. I have since read in acad disc. group that loading the profile is not the same as launching from an icon.

    Could it be that the aShell.Run portion of the script is simply loading the profile, therefore we still have the same problem???

    Thanx,
    Rob
    Last edited by rad.77676; 2005-01-11 at 04:04 PM. Reason: To Correct path

  10. #20
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: GetObject

    If you modify a copy of the icon to do the same thing as the script modification, what happens?

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. API question: GetObject() to link to a running Robot instance
    By bauskas in forum Robot Structural Analysis
    Replies: 12
    Last Post: 2012-03-06, 09:39 AM
  2. Another GetObject problem
    By smn in forum VBA/COM Interop
    Replies: 5
    Last Post: 2011-05-04, 02:50 PM
  3. getObject for NavisWorks
    By gregor.vilkner in forum VBA/COM Interop
    Replies: 0
    Last Post: 2010-05-17, 06:22 PM
  4. GetObject AutoCAD Application
    By sthedens in forum VBA/COM Interop
    Replies: 8
    Last Post: 2006-09-21, 02:52 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
  •