Results 1 to 7 of 7

Thread: Is there a variable by which I can get font file location?

  1. #1
    Member rajat_bapi_mallick's Avatar
    Join Date
    2005-08
    Location
    Kolkata, INDIA
    Posts
    40
    Login to Give a bone
    0

    Question Is there a variable by which I can get font file location?

    Hi !

    Is there any variable by which I can get font file location ?

    - Rajat
    India

  2. #2
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Is there a variable by which I can get font file location?

    Quote Originally Posted by rajat_bapi_mallick
    Hi !

    Is there any variable by which I can get font file location ?

    - Rajat
    India
    Hi rajat,
    How about this code
    Code:
    (setq file "C:/Program Files/AutoCAD 2005/Fonts")
    (getfiled "Select a font file" file "" 0)

  3. #3
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Is there a variable by which I can get font file location?

    Quote Originally Posted by Adesu
    Hi rajat,
    How about this code
    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.
    R.K. McSwain | CAD Panacea |

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Is there a variable by which I can get font file location?

    Quote Originally Posted by rajat_bapi_mallick
    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)

    Code:
    (vl-load-com)
    (vla-get-SupportPath
      (vla-get-files
        (vla-get-preferences
          (vlax-get-acad-object)
        )
      )
    )
    R.K. McSwain | CAD Panacea |

  5. #5
    Member rajat_bapi_mallick's Avatar
    Join Date
    2005-08
    Location
    Kolkata, INDIA
    Posts
    40
    Login to Give a bone
    0

    Default Re: Is there a variable by which I can get font file location?

    Thanks.

    But I need windows default ".TTF" font file location.


    -Rajat
    Last edited by rajat_bapi_mallick; 2007-05-19 at 09:33 AM.

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Is there a variable by which I can get font file location?

    Quote Originally Posted by rajat_bapi_mallick
    Thanks.

    But I need windows default ".TTF" font file location.


    -Rajat
    Ok. You didn't say that in your original post.

    This should work.

    Code:
    Environ("systemroot") & "\Fonts"
    R.K. McSwain | CAD Panacea |

  7. #7
    Member rajat_bapi_mallick's Avatar
    Join Date
    2005-08
    Location
    Kolkata, INDIA
    Posts
    40
    Login to Give a bone
    0

    Default Re: Is there a variable by which I can get font file location?

    Thanks.

    It really works.

Similar Threads

  1. 2012: Japanese font files (SHX) location
    By cadman_99 in forum AutoCAD Customization
    Replies: 3
    Last Post: 2012-07-20, 04:09 AM
  2. Using Environmental Variable for Source Location
    By heath.simone in forum Revit - Platform
    Replies: 0
    Last Post: 2012-06-05, 04:43 AM
  3. Replies: 5
    Last Post: 2010-06-04, 06:45 PM
  4. Update font used in multiple dimension styles to one common font file
    By tomasz.stachowiak in forum AutoCAD General
    Replies: 1
    Last Post: 2007-03-22, 08:54 AM
  5. Swap old custom font file for new font file
    By dgalloway in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-02-02, 03:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •