Exchange Forum > AutoCAD General
Object Snap tab in the dsettings dialog
Object Snap tab in the dsettings dialog

#1

Joel
Join Date:
09-28-2007
I want to bring up the dsettings dialog in a small lsp routine. It defaults to the last tab I was using in the dsettings dialog.
Is there a way to have it go to the Object Snap tab instead? Here is part of the code I am referring to.
 
Code:
;This one uses the dsettings dialog, but defaults to the last tab used.
(command "dsettings")
;This one uses the command line version. Not what I wanted.
(command "osnap")
Object Snap tab in the dsettings dialog

#2

J Moreno
Join Date:
07-30-2007
There are a few commands that when they default to the command line version you can just add a (initdia) before the (command “___”) to bring up the dialog version. I know this works with bhatch, mtext, purge, rename, view and wblock to name a few. However, I’m not sure how the dsettings dialog works.
Object Snap tab in the dsettings dialog

#3

J Briggs
Join Date:
07-25-2007
For the AutoCAD dialogs with tabs, you can precede the command name with a plus sign "+" to prompt for the tab index number.
The tab index is 0 based, so the first tab would be 0 and so on.
You can try this on the command line to test it.
Quote:
Command: +DSETTINGS 
Tab Index <0>: 2
2 takes you to the "Object Snap" tab.
It also works with the "Options" dialog.
Quote:
Command: +OPTIONS 
Tab index <0>: 7 
7 takes you to the "Selection" tab.
For your code all you need is this.
Code:
(command "+DSETTINGS" "2")
Here's a related topic that may be of interest.
..\Forum2\F2T8P1.htm
Object Snap tab in the dsettings dialog

#4

Joel
Join Date:
09-28-2007
Thanks for the tip.
That works good.
Joel