When trying to use one of your hatch patterns in a drawing, you saw the following error message: Unable to locate target hatch pattern.
The error message may or may not list the name of the hatch pattern in question.
This issue can occur for a few known reasons:
- You tried to save a hatch from a custom PAT file that itself contains multiple PAT files and hasn't been set up correctly. The patterns may be visible and placeable from the ACAD Hatch command, but after saving the hatch into Land F/X, you saw this error while trying to place it.
- The folder that contains your hatch patterns may be listed incorrectly, or not at all, in the Support File Search Path in the CAD Options dialog box
- You may be experiencing a problem with the XML file associated with the hatch you're trying to place.
• Are you able to see the hatch when using the ACAD Hatch command, but you saw this error right after saving the hatch into the Land F/X system?
To find out which of these issues you're experiencing, check whether the name of the hatch pattern you're trying to place is listed in the error message:
• The full name of the hatch pattern is listed in the error:
In this case, the error might be occurring because the folder containing your hatch patterns is listed incorrectly, or not listed at all, in the Support File Search Paths.
1. Check the location where your hatch pattern files are saved, and take note of this location.
In this example, our custom hatch patterns are stored in a folder named my-hatches within the folder Documents.
2. Open the Options dialog box:
Manage ribbon, Options button
type Options in the Command line
right-click in the Command line and select Options from the menu
Tools pull-down menu
3. Select the Files tab in the Options dialog box.
Expand the Support File Search Path entry by clicking the plus (+) sign to the left.
Check for your hatch folder in the list of folder paths. In our example, the Support File Search Path includes the folder C:\landfx\patterns (the default location of our default hatches), but it does not include the folder C:\my-hatches, where our custom hatches are stored.
4. If you don't see the name of the exact folder where you've saved your hatch patterns in the Support File Search Path, you'll need to add that folder.
Click Add. Then click Browse.
5. Browse to the folder that contains your hatch patterns.
In our example, we'll browse to the folder C:\my-hatches.
Highlight the correct folder, and click OK.
6. The folder that contains your hatch patterns should now be included in the Support File Search Path.
Click Apply to save the change.
7. Once you've verified that the Support File Search Path contains the correct folder for your Land F/X hatches, check whether the missing hatch pattern is an AutoCAD pattern.
Verify that the Support File Search Path includes the following entry:
(Where 20xx is your year version of AutocAD or F/X CAD. The name of the folder rxx.x will vary depending on your version year.)
Click Add, then click Browse.
Navigate to the path C:\Program Files\Autodesk\AutoCAD\20xx\rxx.x\enu\support.
Select the Support folder and click OK.
You should now see that path listed in the Support File Search Path and can continue to the next step.
8. Once you've verified that the Support File Search Path includes the path C:\Program Files\Autodesk\AutoCAD\20xx\rxx.x\enu\support, navigate to that location.
You'll need to have your hidden files and folders visible to navigate to this location.
9. Verify that the missing hatch pattern is identified in the Notepad file you've just opened.
Some firms have replaced this file with a custom one that didn’t include all the default AutoCAD hatch patterns. If this is the case, try to revert this file back. You may need to repair or reinstall AutoCAD to obtain this default file. Important: If your year version of AutoCAD is older than the two most recent versions, you'll need to pay a Legacy reinstallation fee to reinstall.
10. Follow our instructions to save your hatch into Land F/X (even if you've already done so).
Try placing the same hatch you attempted to place before. If you don't see the error message, you've resolved the issue.
• The name of the hatch pattern is listed without a .pat file extension in the error:
The hatch may be visible and placeable from the AutoCAD Hatch command, but after saving it into Land F/X, you saw this error when you attempted to place the hatch.
If this is the case, you're adding a hatch from a custom PAT (.pat) file that contains multiple PAT files and hasn't been set up correctly.
To address this issue, you'll need to separate the patterns into individual PAT files manually.
1. Open the overall PAT file in a text editor.
2. Locate the name of the hatch pattern you're trying to use. Copy the text of that pattern only.
3. Paste the copied text into a new text file, and save it as *pattern name*.pat in your LandFX/patterns folder (where *pattern name* matches the name of the file that the error message said was missing).
Note that for AutoCAD to read PAT files correctly, it needs them to be in a specific format. PAT files need to include each of the following items:
- The title line
- The content (which can consist of several lines)
- An empty line return at the end
PAT files without this format, including the empty line at the end, will not function correctly.
You should now be able to place the hatch without seeing the error.
• The name of the hatch pattern is not listed in the error:
In this case, your XML file could be the source of the problem, possibly because of an improper save/adjustment when customizing these hatches.
1. Navigate to the folder LandFX/hatch.
2. Locate the XML file associated with the hatch type that is causing the issue. The XML file names correspond with the tabs for the different hatch types you see when placing hatches. For example, if you're having an issue placing a drip hatch, locate the file _drip_.xml
Change the name of this file. In our example, we'll rename the drip hatch XML file, giving it the name _drip_.xml.old.
If you have custom hatches of this hatch type, you'll need to work on the user.xml file.
3. Try placing a hatch from the same hatch library again. For example, if you were trying to place a drip hatch when you saw the error, place any drip hatch. If you don't see the error, you've resolved the issue. Land F/X should create a new XML file for that hatch – check to confirm that this file was indeed created.
If you've created any custom hatches and saved them into the LandFX folder, (such as within the drip hatches), they will no longer be in that location if you rename the XML file for that hatch type as instructed above. If you only have a few custom hatches, you can simply follow the steps above and then use our Save Hatch tool to resave them into our system.
You can also try restoring the .bak version of the user.xml file (this is, the file user.xml.bak) if needed. Otherwise, if you have several custom saved hatches in this folder, you might want to open the file and complete the following steps.
1. Make a copy of the XML file, just in case.
2. Open the file in a text editor such as Notepad.
3.Find the "Row" that contains the block_descrip that is causing the issue. Fill in the block_name with the correct hatch name. For example: block_name: ANSI35 block_descrip: DRIPLINE-05.
4.Save the file. The hatch should place correctly without causing the error.