Jump to content

Startup Switch


fernandofelix

Recommended Posts

Hi,

 

I am trying to use the profile switch in autocad to start with our custom profile, it works fine, but the problem is that after I close autocad and try to open pure autocad (without the /p switch), it opens it with our profile. It seems that AutoCAD is always opening with the last profile used, no matter it was with the /p switch which is supposed to be for only the current session.

 

Is there something I am doing wrong? I just want that if I open AutoCAD from certain icon (ours), it will open with my profile, but if I open AutoCAD from the *normal* icon, it will open with the default profile (or the last profile used... any profile except my customized one)... by the way, using another /p switch to the normal icon is not the way I want.

 

Thanks for your time,

Link to comment
Share on other sites

I'd create a desktop icon for each unique profile.

 

The problem is that we have a software that runs into AutoCAD, so we can not be telling the clients to create different shortcuts for their profiles... As I read the startup switch /p, it says that it will launch AutoCAD with the profile for only the current session, however the next time normal AutoCAD runs is still with our profile.

 

I tried to change back the profile before closing AutoCAD (in the code of our software), so this way if the client launched normal AutoCAD it would have as current the same they had before using our software, but it just messes the other profiles (don't know why)... So that's why I am looking for a way to use the /p switch but I do not want that when they launch AutoCAD the have our profile as current (it is annoying for the user), and I do not think it is friendly to tell client to create a bunch of shortcuts for their profiles, also I do not think that AutoCAD guys did not think about it before after all these years.

Link to comment
Share on other sites

/p

 

Specifies a user-defined registry profile for starting the program. The selected profile is in effect only for the current session of the program, unless you make another profile current in the Options dialog box during that session.

 

You create or import profiles on the Profiles tab in the Options dialog box. With the /p switch, you can specify the name of a profile that is listed in the Options dialog box or the file name of an exported profile (ARG) file. If the profile does not exist, the current profile is used.

Link to comment
Share on other sites

I think I did not explain the problem correctly.

 

We have a software (created by us), that launches autocad with our profile and loads an ARX file (our software), the user have the customization correct for our program and everything is fine... the problem is that after they use our software, if they try to use normal AutoCAD (without our program) it also starts with our profile.

 

In the paragraph you wrote it says: [...]The selected profile is in effect only for the current session of the program[...], this is what confuses me, because I am not experiencing that! that's exactly what I want, that the profile will be current only for the current session, so if they launch AutoCAD (not our program), they will have as current the profile that they normally use.

 

I hope I could explain it better, and that someone can help me with this issue... I have been dealing with this for a week, and I just can not make it work correctly

Link to comment
Share on other sites

Remark has given you accurate information regarding the /p switch.

 

I understand that you're not inclined to tell your customers what do to with other application icons, and I do not use vanilla AutoCAD (I use a vertical), but even our OOTB 'As AutoCAD' application icon uses the /p switch to specify an 'AutoCAD' profile. This has always been the case in my experience, even back to the days of Land Desktop.

 

If your client is not using a /p switch in their other application icon(s), then they've done so willingly.

 

Separately, this sounds like a great use-case for additional testing & debugging on your part prior to future releases of your software methinks. :beer:

Link to comment
Share on other sites

We have "Autoturn" as a seperate icon alltogether it contains its own startup "C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\acad.exe" /ld "C:\Program Files\Transoft Solutions\AutoTURN 8\AT2013x64.ARX" this may be the way around it.

Link to comment
Share on other sites

Thanks for your replies :)

 

So, there is no way that I can open AutoCAD with a profile for only 1 session? That if the user launches Vanilla AutoCAD (without a switch), it will not use our profile?

 

The only solution to this problem is to make the client to modify his shortcuts?

Link to comment
Share on other sites

So, there is no way that I can open AutoCAD with a profile for only 1 session? That if the user launches Vanilla AutoCAD (without a switch), it will not use our profile?

 

The only solution to this problem is to make the client to modify his shortcuts?

 

By not specifying a profile, your client _has_ modified their shortcuts, AFAIK.

 

As I understand it, were their vanilla application icon(s) to be restored to the OOTB state, or to point to their own internal profile instead, this would be a non-issue... Perhaps someone with vanilla AutoCAD can confirm?

 

Regardless, by not specifying a specific profile, your client has willingly chosen to use the last active profile, which may, or may not be that which is associated with your software.

 

To not specify a specific profile, is to set one's self up for failure, no matter how the OOTB application icon is configured IMO.

Link to comment
Share on other sites

In my computer (and testing computers), I have plain AutoCAD... I created a two shortcuts, one with the /p switch and one with nothing, I opened the plain one and the profile was >, then I closed it and opened the other one and the profile was the ours, I proceed to close it and open the first one and I was waiting to see the > back but it was not.

 

So I guess the only solution here is to tell the customer to use the /p switch on their other shortcuts... because as I said before, I also tried to do it in the code of our program (first look for AutoCAD, then see which profile is current and save in registry, switch to our profile... then before closing AutoCAD our program would switch back to the profile that is saved in the registry... it worked fine (our profile is no longer used if launched plain AutoCAD), however all the profiles were messed up (settings, paths, toolbars, etc)

Link to comment
Share on other sites

I have never seen an application icon use the /p switch for ">" which is (as I understand it) a backup of the default profile. However, it does show up in the list of available profiles. I have only ever seen named profiles being used with the /p switch. Perhaps there is a behavioral difference... I am really unsure.

 

I am no expert at .NET, nor ObjectARX development, but I do not understand how one would go about firing an Event Monitor's callback prior to AutoCAD being initialized, and/or your Assembly (and subsequent methods, properties, fields, etc.) being instantiated. This seems counter intuitive to me, as this entirely (if even possible) bypasses the built-in system(s) for handling this behavior (i.e., the /p switch for example).

 

I can only imagine the amount of (perhaps non-billable) time you've spent/wasted on this, all as a result of your client not understanding that using the /p switch is a simple, and best practice for safeguarding their own production needs, never mind that of the software they're paying to add-on.

 

Separately, and also worthy of consideration, more on the startup sequence:

 

 

Consider the load order at startup:

linky

 

A. CUI files loaded:

1. Enterprise

2. Main

3. Partials to Main

4. Partials to Enterprise

 

B. acad*.* files loaded:

1. Files listed in acad.rx

2. acad2009.lsp

3. acad.lsp

4. acad2009doc.lsp

5. acaddoc.lsp

6. acad.dvb

 

C. CUI-associated MNL and LSP files loaded:

1. Enterprise named MNL

2. Enterprise loaded LSP and MNL

3. Main named MNL

4. Main loaded LSP and MNL

5. Partials to Main named MNLs

6. Partials to Main loaded LSPs and MNLs

7. Partials to Enterprise named MNLs

8. Partials to Enterprise loaded LSPs and MNLs

 

D. Startup suite files loaded

 

E. Startup routines run:

1. AcadStartup() called (AutoCAD startup)

2. AcadDocument_Activate() called (Drawing startup)

3. (S::STARTUP) called

4. SCR loaded from /b switch

 

... Perhaps this will benefit you at some point. Good luck! :beer:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...