PGP problem

PGP problem

jimbir
Advocate Advocate
2,344 Views
16 Replies
Message 1 of 17

PGP problem

jimbir
Advocate
Advocate

I have no problem when I enter DIMSCALE on the command line.

I've added the following command to my PGP file, saved the file, and ran the REINIT command on the PGP file. When I Enter DMS On the command line, I get the "unknown command" message. Could someone help me with this problem?

Jim Birke

 

DMS,   *DIMSCALE

0 Likes
Accepted solutions (2)
2,345 Views
16 Replies
Replies (16)
Message 2 of 17

imadHabash
Mentor
Mentor

Hi,

while you editing your pgp file from AutoCAD make sure that you press Apply button and confirm changes , make sure that your aliasedit dialog is closed not minimized . 

 

 

Imad Habash

EESignature

0 Likes
Message 3 of 17

chriscowgill7373
Advisor
Advisor

DIMSCALE is a variable, not a command, so you cannot shortcut it using the pgp file.  You would probably have to have some sort of short lisp routine or something that would prompt the user as though they were entering the data for DIMSCALE, and then feed it to the variable.

(defun c:dms (/ rscale)
(setq rscale (getreal "\nEnter new value for DIMSCALE:"))
(setvar "DIMSCALE" rscale)
)

 


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2024 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

Message 4 of 17

Moshe-A
Mentor
Mentor

@chriscowgill7373  hi

 


DIMSCALE is a variable, not a command, so you cannot shortcut it using the pgp file. 

DIMSCALE is a system variable and it's also a command like any other commands and can be added to acad.pgp to be invoke by a shortcut - give it a try 😀

 

@jimbir 

instead of directly changing the dimscale better use an appropriate dimstyle.

 

Moshe

 

Message 5 of 17

imadHabash
Mentor
Mentor

it's work fine from my Aliasedit command .

 

Capture.PNG

Imad Habash

EESignature

0 Likes
Message 6 of 17

chriscowgill7373
Advisor
Advisor

I've learned something new, so I guess I can go to the office now, since I'm already at home?

 

If REINIT didnt work, can you confirm that you edited the correct pgp file?

(startapp "notepad" (findfile "acad.pgp"))  should open the pgp file that AutoCAD is using.

It should be in the bottom section of your code.

If you edited the correct one, and it isnt working after REINIT, did you try restarting AutoCAD completely?  That should force a reread.


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2024 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

0 Likes
Message 7 of 17

jimbir
Advocate
Advocate

Thanks for the quick reply. Can you show me how to add that to the PGP file

0 Likes
Message 8 of 17

jimbir
Advocate
Advocate

Thanks for the quick reply. When I enter Notepad on the command line it asks me the name of the file I want to open. I type PGP and note pad tells me it can't find the file. The location of the file I am editing is located in
C:\Users\JLB\AppData\Roaming\Autodesk\AutoCAD 2004\R16.0\enu\support
jim

0 Likes
Message 9 of 17

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> Can you show me how to add that to the PGP file

Please find >>>this AKN article<<< showing how to edit ACAD.PGP.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 10 of 17

Moshe-A
Mentor
Mentor

@jimbir 

 

key-in ALIASEDIT command.

 

 

0 Likes
Message 11 of 17

chriscowgill7373
Advisor
Advisor
Accepted solution

@jimbir wrote:

Thanks for the quick reply. When I enter Notepad on the command line it asks me the name of the file I want to open. I type PGP and note pad tells me it can't find the file. The location of the file I am editing is located in
C:\Users\JLB\AppData\Roaming\Autodesk\AutoCAD 2004\R16.0\enu\support
jim


if you copy this:

 

(startapp "notepad" (findfile "acad.pgp"))

 

including all the () and paste it at your command line, it will open the pgp file that AutoCAD is using.


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2024 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

0 Likes
Message 12 of 17

pendean
Community Legend
Community Legend
OR try this LISP and skip trying to remember to run REINIT command after esditing the PGP file

;;Edit PGP file then REINIT
(defun c:editpgp(/ pgpfile);command alias editing
(setq pgpfile (strcat "notepad " (findfile "acad.pgp")))
(setvar "re-init" 16)
(prompt "\nACAD.PGP...reinitialized. ")
(princ)
) ;end
0 Likes
Message 13 of 17

jimbir
Advocate
Advocate

I don't have the aliasedit In my 2004 version of autocad.

0 Likes
Message 14 of 17

chriscowgill7373
Advisor
Advisor

@jimbir wrote:

I don't have the aliasedit In my 2004 version of autocad.


I believe ALIASEDIT was added as part of the express tools in AutoCAD 2014.

You saved the file, when you reopen it is it still in the file?  Did you reboot AutoCAD?


Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2024 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

0 Likes
Message 15 of 17

Moshe-A
Mentor
Mentor

@jimbir 


@jimbir wrote:

I don't have the aliasedit In my 2004 version of autocad.


aliasedit is not exist cause the express tools is not installed.

 

go to tools\Customize\edit program parameters (acad.pgp) this a little shorter then manually opening the file in notepad.

 

Moshe

 

0 Likes
Message 16 of 17

jimbir
Advocate
Advocate
Accepted solution

The PGP file that command opened contained shortcut DSC which works. In an effort to find its location I tried the save as command in notebook. At the top of the next window this was listed.

C:\Program Files (x86)\AutoCAD 2004

 

And not the one in:

C:\Users\JLB\AppData\Roaming\Autodesk\AutoCAD 2004\R16.0\enu\support

 

I now know everything, I think...
Thanks for your help
Jim

Message 17 of 17

jimbir
Advocate
Advocate

Chriscowgill7373 Put me on the right track. By following his instructions in post number 11, I determined that I was editing the PGP file stored in my appdata folder and not the one in C:\Program Files (x86)\AutoCAD 2004 Which was the one auto CAD was using. Problem solved.

0 Likes