Jump to content

Problem with Autocad 2013 page setup


Recommended Posts

atrickofthemind

Hi all, I am having issues with what I believe could be a corrupted page setup file. I have gone to the page setup manager to try and delete and re-create, but ANY interaction with the page setup in question causes CAD to immediately lock up and crash (even a right click, somehow). Does anyone know the folder location of these files so that i can go in and manually get rid of one? Thanks

 

Edit: I am using a windows 7 machine.

Link to post
Share on other sites

This lisp is supposed to delete those for you. Page setups are kept in the drawing.

 

;;; save this file to a folder on your C:\ drive, name it PAGESETUP.LSP or any name you want
;;; use the AppLoad command, navigate to this file so it will load each time
;;; type DELETEALLPS to delete all page setups in the drawing or set up a button
;;; type PAGESETUP_IMPORT to import all page setups in the drawing or set up a button
;;;
;;;Dave Jones
;;;Member of the Autodesk Discussion Forum Moderator Program

;Command: (deleteAllPS)
;or
;Command: (deletePS "PageSetupName")

(defun c:DELETEALLPS ()
 (vl-load-com)
 (vlax-for ps (vla-get-plotconfigurations
              (vla-get-activedocument
              (vlax-get-acad-object)))
 (vla-delete ps)
 )
)

(defun deletePS (name)
 (vl-load-com)
 (vlax-for ps (vla-get-plotconfigurations
              (vla-get-activedocument
              (vlax-get-acad-object)))
   (if (= (strcase (vla-get-name ps)) (strcase name))
   (vla-delete ps)
   )
 )
)
;;;;;;;;;;;;;;;;;
;;import page setups - not sure of the original source for this code below
(defun C:PAGESETUP_IMPORT (/ exprt)
(setq exprt (getvar "EXPERT"))
(setvar "EXPERT" 2)

;;*******
;;;CUSTOMIZE THE LINE BELOW THIS ONE FOR YOUR PATH AND DRAWING OR TEMPLATE WITH YOUR PAGESETUPS, see below
(command "._-PSETUPIN" "C:\\YOURPAGESETUPS.dwg" "*")  ;change the name and path to your dwt file, etc

(setvar "expert" exprt)
)

;your pagesetup path will resemble the one below, type that in the line above for YOURPAGESETUPS.DWG
;"C:\\Users\\USERNAME\\AppData\\Local\\Autodesk\\AutoCAD Mechanical 2015\\R20.0\\enu\Template\\template.dwt"

Link to post
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
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...