Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

PGP problem

jimbir
Advocate

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 Me gusta
Responder
Soluciones aceptadas (2)
1.816 Vistas
16 Respuestas
Respuestas (16)

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 Me gusta

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 2022 on Windows 10

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

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 :cara_sonriente:

 

@jimbir 

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

 

Moshe

 

imadHabash
Mentor
Mentor

it's work fine from my Aliasedit command .

 

Capture.PNG

Imad Habash

EESignature

0 Me gusta

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 2022 on Windows 10

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

0 Me gusta

jimbir
Advocate
Advocate

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

0 Me gusta

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 Me gusta

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

(not an Autodesk consultant)
0 Me gusta

Moshe-A
Mentor
Mentor

@jimbir 

 

key-in ALIASEDIT command.

 

 

0 Me gusta

chriscowgill7373
Advisor
Advisor
Solución aceptada

@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 2022 on Windows 10

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

0 Me gusta

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 Me gusta

jimbir
Advocate
Advocate

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

0 Me gusta

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 2022 on Windows 10

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

0 Me gusta

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 Me gusta

jimbir
Advocate
Advocate
Solución aceptada

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

0 Me gusta

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 Me gusta