PDA

View Full Version : 2020 acad.pat file reports as missing



kimlance
2021-12-01, 11:20 PM
Hi all,

Seems for about 2 months now I can't get my hatch patterns to work. I get an "acad.pat" can't find file and then a unable to open file: acad.pat, ERROR=1
Can anyone explain the error here. The .pat files are in the support directory but for some reason it says it can't find them.

Thanks in advance

Kim

Ed Jobe
2021-12-02, 12:32 AM
Did you edit the acad.pat file? If so, you may have a syntax error.

If you created your own pat file, try this. Put the pat files in a folder that is not part of the acad installation, e.g. a network folder. Then add that folder to the Support File Search Path list. Now the hatch command should find your pat file.

kimlance
2021-12-06, 06:59 PM
No, I did not edit the file. But when I went to where it was supposed to be they were converted to a pdf file. I fixed that and then added them to our shared autocad folder and added it to the support file search path and still autocad says there are no .pat files to be found. I'm at a lose here.

cadtag
2021-12-06, 07:08 PM
well, then do a Repair of the installation, or Reset Settings to Default

tedg
2021-12-06, 08:14 PM
Did you say Autocad can or can't find the acad.pat file?
Did you try on the command line:

(findfile "acad.pat")

Should return where it finds it or NIL if it cant.

kimlance
2021-12-06, 09:05 PM
I tried (findfile"acad.pat") and get nil.
Tell me if I do a repair or reset do I loose my workspace settings and toolbars?

Tom Beauford
2021-12-06, 09:16 PM
Search for acad.pat in Windows File Explorer, then copy it to your Roamable Support folder where it should have been on install.
Entering
(startapp "explorer" (strcat "/n,/e," (getvar "roamablerootprefix")"Support"))at the Command line should open your Roamable Support folder.
You can use findfile to search for your other custom hatch patterns like (findfile "marsh1.pat").
If findfile can't find them you wont be able to use them either.

kimlance
2021-12-06, 09:27 PM
Ok so I did your code and it opened in the correct file and the files are there. I already checked this before and don't understand that acad says it can't find file.

Tom Beauford
2021-12-07, 03:37 AM
Ok so I did your code and it opened in the correct file and the files are there. I already checked this before and don't understand that acad says it can't find file.

Was that Support folder in Options => [Files] tab => Support Files Search Path?

In Options => [Profiles] tab => try selecting another Profile and picking [Set Current]
I save to a new profile whenever I'm about to mess with Options settings in case I mess something up. Resetting a good profile can save you a lot of grief.

cadtag
2021-12-07, 12:52 PM
Ok, let's go back to the point where you said it had turned into a PDF file. HOW did you fix that? Are file extensions visible in Windows File Explorer? (View tab, File Name Extensions is checked?)

kimlance
2021-12-07, 07:21 PM
First I did out it in a new profile. But the set current is grayed out. Also in explorer the file extension was in pdf and I right clicked and selected open with notepad and it converted the extension back to .pat.

kimlance
2021-12-07, 07:44 PM
First I did put it in a new profile, but the set current box is grayed out. Also while looking for the .pat file in explorer I noticed the file was converted to a pdf file I right clicked on it and selected open in note pad in which converted it back to a .pat file.

Tom Beauford
2021-12-08, 12:43 PM
First I did put it in a new profile, but the set current box is grayed out. Also while looking for the .pat file in explorer I noticed the file was converted to a pdf file I right clicked on it and selected open in note pad in which converted it back to a .pat file.
Sorry but it's really starting to sound like your AutoCAD has been infected with a by Malicious Code.

To Recover From an Attack by Malicious Code
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-Core/files/GUID-86C1545F-3549-4DC0-A9F7-7019A8861AF3-htm.html
If your installation has already been impacted by a malicious application or routine that runs on startup, following these general steps:

Run your anti-virus checker. All leading anti-virus solutions identify and repair AutoCAD virus infections.
Start your AutoCAD-based product using the /safemode command line switch.
Find and remove all malicious code. This process is made more difficult if you had been running as an Administrator with User Account Control (UAC) turned off. As a result your AutoCAD install folder might be compromised as well.
Repair any affected files.
Set the SECURELOAD system variable to 1 or 2.
Set the TRUSTEDPATHS system variable to unique, read-only folders.
Remove the /safemode command line switch from the command line parameters.

Personally I'd never download a VLX, FAS or any compiled code. Many AutoCAD verticals like Civil 3D once relied heavily on VBA but none have had it since 2011 version since it was a primary source of Malicious Code. VBA has not been enabled by default since then and they've only allowed us to enable it since then because some firms may still have VBA code they rely on. I strongly advise not enabling it. Never set SECURELOAD (System Variable) (https://help.autodesk.com/view/ACD/2022/ENU/?guid=GUID-541566C6-2738-49DD-87C3-C1490E924A02) to 0! Always follow those recommendations, they're not just for fixing you problem now.

Ed Jobe
2021-12-08, 03:58 PM
Cadtag asked you if you have Windows Explorer set to display file extensions. Did you do that? Notepad will take the file and name it acad.pat.txt. If you don't have ext turned on, it will look like acad.pat.

kimlance
2021-12-08, 07:39 PM
Yes I do have it set to display