TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Peter2 on January 30, 2014, 09:44:24 AM
-
Is there a way in (V)Lisp to find all characters which are defined in a SHX file? I need a list like "A, B, C" or better Ascii-codes or Unicode-definitions like "\u+1234".
-
If you covert the shx file back into a shp file it would be very easy.
SHX2SHP.EXE used to be included in the core ACAD install. I don't know if it still is
With a little digging you should able to find the shapefile ( .shp ) format.
I take a look see myself as to what is out there.
-David
-
Starting with Page 117
http://docs.autodesk.com/ACDMAC/2013/ENU/PDFs/acdmac_2013_customization_guide.pdf (http://docs.autodesk.com/ACDMAC/2013/ENU/PDFs/acdmac_2013_customization_guide.pdf)
I have 6 copies of SHX2SHP.EXE on this machine. They are all the same file, just different locations
Disk Volume: 1-30-14 11:51:28 am Page 1
Available space 207,271,845,888 bytes
583,261 logged files using 338,111,105,903 bytes
6 tagged files using 90,132 bytes
Path: C:\ACAD\FONTS
1 tagged files using 15,022 bytes
6-17-95 8:56:18 pm 15,022 .a.. SHX2SHP .EXE
Path: C:\ACAD\UT
1 tagged files using 15,022 bytes
6-17-95 8:56:18 pm 15,022 .a.. SHX2SHP .EXE
Path: C:\Documents and Settings\Public\acad\FONTS
1 tagged files using 15,022 bytes
6-17-95 8:56:18 pm 15,022 .a.. SHX2SHP .EXE
Path: C:\Documents and Settings\Public\acad\UT
1 tagged files using 15,022 bytes
6-17-95 8:56:18 pm 15,022 .a.. SHX2SHP .EXE
Path: C:\Users\Public\acad\FONTS
1 tagged files using 15,022 bytes
6-17-95 8:56:18 pm 15,022 .a.. SHX2SHP .EXE
Path: C:\Users\Public\acad\UT
1 tagged files using 15,022 bytes
6-17-95 8:56:18 pm 15,022 .a.. SHX2SHP .EXE
I'll take credit for (2) of these, the rest were installed by ACAD somewhere along the line.
-David
-
If you covert the shx file back into a shp file it would be very easy.....
Thanks, but the idea is to create a kind of simple SHX Viewer inside AutoCAD. The software should
a) find all defined characters in a defined SHX
b) create a TEXT in AutoCAD for each character
b) is simple, a) is what I'm asking for.
-
Doing viewer is very simple. However it will not inform you as to what is defined or not. AutoCAD will simply display a question mark for unknown characters.
You will have to go back to the original shape file definitions. -David
-
...However it will not inform you as to what is defined or not....
That's the problem. A font which uses some special characters at ANSI Code 8000 or 10000 creates a lot of trash if I print thousands of question marks.
-
You will have to test for BIGFONTS, SHAPE formatted files and whether the shape_number is either HEX or Decimal
This could be the base engine :
(defun c:findchr
(/ file rf nl c f fd hl
) (if shp_file shp_file
"/acad/fonts/") "shp" 2)))
The list hl contains the shape_numbers of the characters defined in the selected .shp file.
-David
-
Thanks, but the idea is to create a kind of simple SHX Viewer inside AutoCAD.
You could always use findfile to check if there's already a SHP file with the same name as the SHX. Then if not found use startapp function to run the SHX2SHP on the SHX file to create a SHP. Then use something like David's code to figure out which characters / shapes are defined in that font/shape file.