Could you try this on your machine?:
"c:\Program Files\Autodesk\AutoCAD 2012 - Deutsch\Acad.exe"
If it works, when you try opening a dwg, AnyJobDirectory should be the default in the dialog (on condition sysvar REMEMBERFOLDERS is 0).
I started AutoCAD 2012, set REMEMBERFOLDERS to 0 and closed it
I modified my BAT file to the following content:
"\Program Files\Autodesk\AutoCAD 2012 - Deutsch\acad.exe"
Then I started this BAT ==> command _OPEN brings me to "C:\TEMP" as the current folder.
- alfred -
Thank you for the answer and for your time.
Your answer got me thinking and I decided I can't believe that all this is due to differences between OS's or Acad versions, and that it must be something much simpler (it usually is, you know). It may be due to AutoCAD and Windows distancing themselves from MS DOS (batch files etc.), but then why should it run on Win7 and not on XP?
I have an idea I'll test after the holiday here, and I'll report on the results in a couple of days.
I found the problem was historical: the shortcut to the bat file used to launch AutoCAD 2004 was in fact a .pif file, probably inherited from earlier days.
It was copied and modified to launch AutoCAD 2008 and worked without any problems, but it failed to work on AutoCAD 2012. The reasons are unclear at this time, as Microsoft says .pif files should work under XP.
Anyway, replacing the .pif with a regular shortcut to the .bat file solved the problem.
There remain, though, a few minor unclear items:
1. If we use the the 8.3 DOS format ("C:\Progra~1\...") to launch Acad (in the batch file), any form of the LAYER command is command line only, we can't launch the dialog; this does not happen if we use the full quoted path ("C:\Program Files\...") to launch Acad.
2. No matter how we launch Acad, after we Open a drawing the crosshairs freeze (or sometimes are missing alltogether) and only a REGEN (from the menu - the command line is frozen too) restores the input system to normal. This does not happen on the initial drawing (Drawing1) or on any subsequent drawings (after performing the Regen on the first drawing opened).
It seems that AutoCAD does not perform the usual Regen after opening the first drawing and waits for the user to do it.
Thus, there is no more need to use a .NET program to launch Acad, the batch file approach works well enough, the plug-ins load ok, etc.
Of course the whole exercise raised some questions which remain unanswered.
Maybe some Autodesk guru will care to comment on this.
great that you come back with what you found out, thank you!
And yes, I never ever would have thought about pif, too historical
>> 1. If we use the the 8.3 DOS format
Is there any reason you need 8.3 file naming? At least I see that as not safe: if you use such a short name on different systems the "Program~1" might point to everything else, but not "C:\Program Files".
>> 2. No matter how we launch Acad, after we Open a drawing the crosshairs freeze
Is your application automatically loaded and has some type of form or palette. If so: check one time to start AutoCAD without loading your application and see if the cursor freezes too. I had a case that a control on a palette (which was automatically loaded) grabed the focus.
- alfred -
You answered before I had time to edit a bit my answer (not important).
There is no reason to use the DOS format (although in this case it points to the right file and launches Acad).
I just think it very strange that the file name format should cause differences in AutoCAD's behaviour.
About the crosshairs problem: there is no connection with my app. Even on a clean launch, without any apps loaded, it happens.
>> Even on a clean launch, without any apps loaded, it happens.
Well, than I would try now:
and if all failes, try with another Windows user account so it starts with a brand new profile.
Good luck, - alfred -
i think this is the problem about File Path. there are 2 different dynamic paths: DllPath and ExePPath, which may varies according to the way they are loaded . i suggest 2 things you check:
1. make sure that your program had really netload the dll correctly. sometimes it may fail.
2. the main app(which shells the autocad and netloads the dll) is in the same dir as the acad.exe and yourAddIn.dll.
and you can put all the relative files in the same dir as acad.exe, then check the result, if still the same problems, we look for other bugs.
may this be helpful to you!
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register