Jump to content

Grid On for every drawing


Guest btompkins

Recommended Posts

Guest btompkins

Hi Folks,

 

I have Mechanical 2011 and like the Grid On when I work, personal preference I guess. I have the system variable GRIDMODE set to 1 and the template drawing that opens when AutoCAD starts saved with the grid lines on.

 

I know the grid state is saved in the drawing but is there a way to have the grid always on regardless of the drawing, many drawings I work with are from outside of my organization.

 

Thank you in advance for any suggestions

Bob T

Link to comment
Share on other sites

Hi Folks,

 

I have Mechanical 2011 and like the Grid On when I work, personal preference I guess. I have the system variable GRIDMODE set to 1 and the template drawing that opens when AutoCAD starts saved with the grid lines on.

 

I know the grid state is saved in the drawing but is there a way to have the grid always on regardless of the drawing, many drawings I work with are from outside of my organization.

 

Thank you in advance for any suggestions

Bob T

 

Press F7 for each drawing, or add GRIDMODE 1 to ACADDOC.LSP, if you don't have one create one.

Link to comment
Share on other sites

Guest btompkins

Thanks rkent,

 

Below are the contents of my ACADDOC.LSP, where would the GRIDMODE system varible be added and what exactly would it look like? Thanks for your help.

 

;;;*-*TXT acad.lsp is loaded once, acaddoc.lsp is loaded for each

;;; document, s::startup in any case is called after acaddoc.lsp

;;; has been loaded

;

;;(if (= nil acad_helpdlg)

;; (progn

;; (load "acadr15.lsp")

;; (load (strcat (getvar "menuname") ".mnl"))

;; )

;;)

(if (= nil genlade)

(progn

(princ (load "gen/acadm.lsp" "\nError: acadm.lsp not loaded!"))

(if acadmappend (setq s::startup (acadmappend s::startup)))

)

)

 

Thanks

Bob T

Link to comment
Share on other sites

Thanks rkent,

 

Below are the contents of my ACADDOC.LSP, where would the GRIDMODE system varible be added and what exactly would it look like? Thanks for your help.

 

;;;*-*TXT acad.lsp is loaded once, acaddoc.lsp is loaded for each

;;; document, s::startup in any case is called after acaddoc.lsp

;;; has been loaded

;

;;(if (= nil acad_helpdlg)

;; (progn

;; (load "acadr15.lsp")

;; (load (strcat (getvar "menuname") ".mnl"))

;; )

;;)

(if (= nil genlade)

(progn

(princ (load "gen/acadm.lsp" "\nError: acadm.lsp not loaded!"))

(if acadmappend (setq s::startup (acadmappend s::startup)))

)

)

(command "gripmode" "1")

Thanks

Bob T

 

See above in red. If you want more setvars set you can do it in the same line like,

 

(command "gripmode" "1" "pickfirst" "1" "filedia" "1")

Link to comment
Share on other sites

You will want to control your gridunit setting as well so

(command "gridunit" "0.125,0.125" "gridmode" "1" "griddisplay" "3" "gridstyle" "1")

Replace the .125 with what you like to use, adjust the other settings with what you like to see. See help for all the Grid... setvars.

Link to comment
Share on other sites

Guest btompkins

It works, sort of, I will have to tweak the settings, the first drawing that opens when ACAD starts now has dots when before it was a grid, also the grid does display on existing drawings when opened, but only in paperspace, not model view, any suggestions?

 

Thanks

Bob T

Link to comment
Share on other sites

Change gridstyle to 0. It will take more than a simple command line setting to get this to work in all the different viewports. You will have to ask in customization.

Link to comment
Share on other sites

OK, that took care of the dots, now how do we get the grid on in model space at startup? It is on in paper space.

 

Thanks

Bob T

 

Maybe have a two key command to do that once you are in ModelSpace.

 

Add this in your acaddoc.lsp in place of the other that I sent earlier. Once in MS type GG enter.

 

(defun c:GG (/)

(command "gridunit" "0.125,0.125" "gridmode" "1" "griddisplay" "1" "gridstyle" "0")

)

Link to comment
Share on other sites

Guest btompkins

Update, with the help of an experienced cad trainer, we figured out a solution, I have been asked not to paste the exact statement we used but it involves activating the required tab and setting the grid variables for that tab then adding that statement to the ACADDOC.LSP file.

 

So I am set, thanks for your help krent.

 

Bob T

Link to comment
Share on other sites

Update, with the help of an experienced cad trainer, we figured out a solution, I have been asked not to paste the exact statement we used but it involves activating the required tab and setting the grid variables for that tab then adding that statement to the ACADDOC.LSP file.

 

Bob T

 

Asked not to post the solution, that is hilarious, does the experienced trainer think it is proprietary information? Not how things work on these forums, people share. Let me guess, the secret statement involves Tilemode = 1. If I am right don't post it, maybe I can sell that information myself. :shock:

Link to comment
Share on other sites

Guest btompkins

rkent, thank you for your kind response, here is the code:

 

;Activate model tab

(command "_.TILEMODE" 1)

;Set model tab grid values

(command "GRIDUNIT" "0.125,0.125" "GRIDMODE" "1" "GRIDDISPLAY" "3" "GRIDSTYLE" "0")

;Switch to last activate layout tab

(command "_.TILEMODE" 0)

;Activate paper space mode and set grid values

(command "_.PSPACE" "GRIDUNIT" "0.125,0.125" "GRIDMODE" "0" "GRIDDISPLAY" "3" "GRIDSTYLE" "0")

;Activate model tab

(command "_.TILEMODE" 1)

Link to comment
Share on other sites

Update, with the help of an experienced cad trainer, we figured out a solution, I have been asked not to paste the exact statement we used

Bob T

 

Sounds like your "experienced cad trainer" is one of those "only the high priest can read the sacred scrolls" guys.

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...