View Full Version : Is there a variable by which I can get font file location?
rajat_bapi_mallick
2007-05-16, 01:04 AM
Hi !
Is there any variable by which I can get font file location ?
- Rajat
India
Adesu
2007-05-16, 01:10 AM
Hi !
Is there any variable by which I can get font file location ?
- Rajat
India
Hi rajat,
How about this code
(setq file "C:/Program Files/AutoCAD 2005/Fonts")
(getfiled "Select a font file" file "" 0)
rkmcswain
2007-05-16, 01:25 AM
Hi rajat,
How about this code
(setq file "C:/Program Files/AutoCAD 2005/Fonts")
(getfiled "Select a font file" file "" 0)
I think the OP is wanting to find out where AutoCAD is looking for fonts.
Your code only looks in a particular directory which may or may not exist.
rkmcswain
2007-05-16, 01:35 AM
Hi !
Is there any variable by which I can get font file location ?
- Rajat
India
No, there is not a variable. AutoCAD will search all the paths in the support file search path for SHX fonts. You will have to query each of these paths.
The following code will return the support file search paths (as a semicolon separated string)
(vl-load-com)
(vla-get-SupportPath
(vla-get-files
(vla-get-preferences
(vlax-get-acad-object)
)
)
)
rajat_bapi_mallick
2007-05-19, 09:31 AM
Thanks.
But I need windows default ".TTF" font file location.
-Rajat
rkmcswain
2007-05-19, 12:31 PM
Thanks.
But I need windows default ".TTF" font file location.
-Rajat
Ok. You didn't say that in your original post.
This should work.
Environ("systemroot") & "\Fonts"
rajat_bapi_mallick
2007-05-24, 05:51 PM
Thanks.
It really works.
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.