Jump to content

Help opens when starting Autocad 2011


Recommended Posts

Posted (edited)

Hi all,

 

Every time I start Autocad, the online Autocad Help window opens in IE. This is very annoying.

 

I made sure the box is unchecked under Options/System/"Use online help from Autodesk website when available"

 

I am using some custom toolbars and lisps. I don't believe it behaved in this manner prior to setting up my customizations, so I think something in those lisps is causing the behavior.

 

My question is what is the best way to track down the cause, short of disabling the lisps one at a time to see if the behavior changes? This would be very time-consuming.

 

Or am I on the wrong track?

Edited by Diedesigner
Posted

No i think you are on the right track, we went through the same thing when upgrading to AC MEP 2011. If i recall correctly it was something wrong with the Autocad migration tool. We upgraded 5 computers 2 had this same problem (different machines) setup/install was the same for all machines in the office tho. My fix i tried to do a reinstall it did fix one. The other computer had to be uninstalled then reinstalled.

Posted

Trying Repair before doing an uninstall/reinstall should be S.O.P. in any office.

Posted

Is it remotely possible the /b startup switch was added to your AutoCAD shortcut and the help file itself specifically referenced?

Posted
Is it remotely possible the /b startup switch was added to your AutoCAD shortcut and the help file itself specifically referenced?

 

I just checked my shortcut properties, but there is no additional switch beyond "C:\Program Files\Autodesk\AutoCAD 2011\acad.exe"

Posted

help opens when AutoCAD opens when I have an error in one of my routines that run at startup. Then I spend about half an hour or so trying to figure out which one it is (usually quicker if I only modify one program at a time). I fix the error in the programming, and AutoCAD quits opening up help.

  • 2 weeks later...
Posted

I narrowed down my problem to a section of my layer lisp, which I cobbled together from examples found here or possibly on the web. I apologize that I don't remember who the original source code belongs to.

 

Anyway, the section in this code surrounded by asterisks is causing Autocad Help to pop open. Can anyone see what may be causing the "error"?

 

 
;; First get the active layer
(setq activelayer (getvar "CLAYER"))
;; Make layer 0 active
(setvar "CLAYER" "0")
(defun c:layupd (/ oldcmd laylist)
(setq oldcmd (getvar "CMDECHO")) (setvar "CMDECHO" 0)
(setq laylist '(("BALLOON" "15" "CONTINUOUS")
("BORDER" "33" "CONTINUOUS")
("BOTTOM" "31" "CONTINUOUS")
("CENTER" "35" "CENTER" "")
("CONSTRUCTION" "5" "PHANTOM")
("DIMENSION" "40" "CONTINUOUS")
("FRONT" "83" "CONTINUOUS")
("GHOST" "12" "CONTINUOUS")
("HATCH" "123" "CONTINUOUS")
("HIDDEN" "252" "HIDDEN2")
("PART" "7" "CONTINUOUS")
("REV" "1" "CONTINUOUS")
("SECTION" "5" "PHANTOM2")
("SIDE" "30" "CONTINUOUS")
("NOTES" "40" "CONTINUOUS")
("TOP" "6" "CONTINUOUS")
))
;; Load line types
(command ".linetype""load""hidden" (strcat"acad.lin")"""")
(command ".linetype""load""hidden2" (strcat"acad.lin")"""")
(command ".linetype""load""hiddenx2" (strcat"acad.lin")"""")
(command ".linetype""load""center" (strcat"acad.lin")"""")
(command ".linetype""load""center2" (strcat"acad.lin")"""")
(command ".linetype""load""centerx2" (strcat"acad.lin")"""")
(command ".linetype""load""phantom" (strcat"acad.lin")"""")
(command ".linetype""load""phantom2" (strcat"acad.lin")"""")
(command ".linetype""load""phantomx2" (strcat"acad.lin")"""")

;;****************problem section************************
(foreach lay laylist
(if (not (tblsearch "LAYER" (car lay)))
(command "-layer" "m" (car lay) "C" (cadr lay) (car lay) "")
(command "-layer" "C" (cadr lay) (car lay) ""))
(if (tblsearch "LTYPE" (caddr lay))
(command "-layer" "L" (caddr lay) (car lay) "")
(princ (strcat "\n" (caddr lay) " Linetype could not be found!"))
)
)
;;*************end problem section************************
(setvar "CMDECHO" oldcmd)
(princ))
(c:layupd)
;;Restore the original active layer
(setvar "CLAYER" activelayer)

Posted

Would it not be simpler to setup your layers, linetypes, etc. within a template drawing (.DWT)? :?

 

As one alternative, you could use an Excel file to manage your layer list as well, for example:

 

My company has multiple disciplines, each having it's own *way of doing things*. Thus, we have developed software for "sheet building" where one of the steps is for the user to pick a file name from a drop down list (an excel file) which holds that discipline's layer scheme... which is subsequently imported into the active drawing.

 

When a change is needed, we request the new layer, or report typos, etc. and the change is made within the excel file.

 

Hope this helps!

Posted

Renderman,

 

I appreciate your input. I'm not a big lisp or VBA guy; if I find a routine that has a function I like, I add it to my lisp collection.

 

Having said that I still want to load my layers via lisp. If I want to work on a drawing that doesn't contain my particular layers, they still get loaded.

Posted

I'd recommend revamping your layer command so it is a little more efficient. I cant tell what the error is from the code, as it seems to close properly.

here is what we use:

;;2010.11.04  Layer Setup by Christopher T. Cowgill                                    ;;
   ;;Truecolor function by Fred Tomke (www.theswamp.org)                                ;;
   ;;Coding assistance provided by Opie, RobertB, and irneb (www.augi.com), ronjonp    ;;
   ;;Original code simplification by alanjt (www.augi.com, www.theswamp.org)            ;;

   ;;****************************************************************************************************************************************

   (defun truecolor (uColor / oColor)
     (setq oColor (vla-getinterfaceobject acadObject "AutoCAD.AcCmColor.18"))
     (cond
   ((= (type uColor) 'INT)
    (vla-put-ColorMethod oColor acColorMethodByACI)
    (vla-put-ColorIndex oColor uColor)
   )
   ((not (listp uColor)) nil)
   ((= (length uColor) 3)
    (vla-put-ColorMethod oColor acColorMethodByRGB)
    (vla-SetRGB oColor (car uColor) (cadr uColor) (last uColor))
   )
   ((= (length uColor) 2)
    (vla-SetColorBookColor oColor (car uColor) (cadr uColor))
   )
     ) ; cond
     ocolor
   ) ; truecolor

   ;;****************************************************************************************************************************************
(defun alllayerset (lst / listlayer name match)
     (command "linetype" "_load" "*" "acad" "")
     (command "-layer" "SET" "0" "")
     (setq listlayer (vla-get-layers acaddocument))
     (foreach y lst
   (if (wcmatch (car y) "*`**")
     ()
     (if (tblsearch "LAYER" (car y))
       ()
       (vla-add listlayer (car y))
     ) ;_ end of if
   ) ;_ end of if
     ) ;_ end of foreach
     (vlax-for    x listlayer
   (or (vl-position (setq name (strcase (vla-get-name x))) '("0" "DEFPOINTS"))
       (if    (setq match (vl-remove-if-not
                 (function (lambda (x) (wcmatch name (strcase (car x)))))
                 lst
               ) ;_ end of vl-remove-if-not
       ) ;_ end of setq
         (mapcar (function
           (lambda    (p v)
             (if v
               (vl-catch-all-apply
                 (function vlax-put-property)
                 (list x p v)
               ) ;_ end of vl-catch-all-apply
             ) ;_ end of if
           ) ;_ end of lambda
             ) ;_ end of function
             '(Freeze Color LineType Plottable Description Truecolor)
             (cdar match)
         ) ;_ end of mapcar
       ) ;_ end of if
   ) ;_ end of or
     ) ;_ end of vlax-for
     (setq name nil)
     (vla-regen acadDocument acAllViewports)
   ) ;_ end of defun

I just feed a list of layers and their properties to the program, and it handles all the rest.

Posted (edited)

I too propose that you re-vamp your code a bit, for efficiency.

 

My two cents...

 


;;;--------------------------------------------------------------------;
;;; Load personal settings function:
(defun c:LPS  (/ linList [color=#0000ff]linetypesTable[/color] layerTable layerName layerItem
              layerColor layerLineType)
 (vl-load-com)
 (vla-startundomark
   (cond (*activeDoc*)
         ((setq *activeDoc*
                 (vla-get-activedocument (vlax-get-acad-object))))))

 ;; Linetypes check
 (foreach lin  '("hidden"
                 "hidden2"
                 "hiddenx2"
                 "center"
                 "center2"
                 "centerx2"
                 "phantom"
                 "phantom2"
                 "phantomx2")
   (if (not (tblsearch "LTYPE" lin))
     (setq linList (cons lin linList))))
 [color=blue](if linList[/color]
[color=blue]    (foreach lin  linList[/color]
[color=blue]      (vla-load[/color]
[color=blue]        (cond[/color]
[color=blue]          (linetypesTable)[/color]
[color=blue]          ((setq linetypesTable (vla-get-linetypes *activeDoc*))))[/color]
[color=blue]        lin[/color]
[color=blue]        "acad.lin")))[/color]

 ;; Layer check
 (foreach lay  '(("BALLOON" "15" "CONTINUOUS")
                 ("BORDER" "33" "CONTINUOUS")
                 ("BOTTOM" "31" "CONTINUOUS")
                 ("CENTER" "35" "CENTER" "")
                 ("CONSTRUCTION" "5" "PHANTOM")
                 ("DIMENSION" "40" "CONTINUOUS")
                 ("FRONT" "83" "CONTINUOUS")
                 ("GHOST" "12" "CONTINUOUS")
                 ("HATCH" "123" "CONTINUOUS")
                 ("HIDDEN" "252" "HIDDEN2")
                 ("PART" "7" "CONTINUOUS")
                 ("REV" "1" "CONTINUOUS")
                 ("SECTION" "5" "PHANTOM2")
                 ("SIDE" "30" "CONTINUOUS")
                 ("NOTES" "40" "CONTINUOUS")
                 ("TOP" "6" "CONTINUOUS"))
   (setq layerTable (vla-get-layers *activeDoc*))
   (if (tblsearch "LAYER" (setq layerName (car lay)))
     (setq layerItem (vla-item layerTable layerName))
     (setq layerItem (vla-add layerTable layerName)))
   (if (/= (setq layerColor (cadr lay)) (vla-get-color layerItem))
     (vla-put-color layerItem layerColor))
   (if (/= (setq layerLineType (caddr lay))
           (vla-get-linetype layerItem))
     (vla-put-linetype layerItem layerLineType))
   ;; <- Additional layer checks go here, eg. freeze, description, etc.
   )
 (vla-endundomark *activeDoc*)
 (princ))
;;;--------------------------------------------------------------------;
(if (= 1 (getvar 'dwgtitled))                                           ; If drawing is named,
 (c:LPS))                                                              ; Load personal settings
;;;--------------------------------------------------------------------;
(princ)

 

 

This code will automatically 'Load [your] Personal Settings' provided you open a titled drawing, but provides a command for adding your settings to any drawing.

 

Hope this helps!

Edited by BlackBox
Revised blue code for efficiency.
Posted
Renderman,

 

I appreciate your input. I'm not a big lisp or VBA guy; if I find a routine that has a function I like, I add it to my lisp collection.

 

Having said that I still want to load my layers via lisp. If I want to work on a drawing that doesn't contain my particular layers, they still get loaded.

 

You can create any number of .dwt files, I have several for each customer, plus one that does just what you say...it has layer 0 and one linetype and that's it. Alternately, you can have a small drawing out there that has all your layers, linetypes and such, and simply insert it into a new drawing. It will bring all the stuff with it and you don't have to worry with updating a lisp every time a new version of autocad comes out.

Posted

Thanks all!

 

I will study your revamped code examples and suggestions - it looks like the answer to my original post is in there.

Posted

Hi Diedesigner,

 

I just happen to read this, maybe I can help because, one day, I had exactly the same problem.

 

It was caused by an in a lisp routine. Or so to say a "" too much. I cannot tell exactly how and where but I'd say somewhere at the end of a code.

 

What happens is when AutoCAD starts up, the routine is loaded, and an is given. Just the same as when starting up vanilla AutoCAD; when ready, hit enter and the help pops up.

 

My 2 cents.

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