AltFontFile Example |
Using Programming Languages other than VBA
Sub Example_AltFontFile() ' This example returns the current setting of ' AltFontFile. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currAltFontFile As String Dim newAltFontFile As String Set preferences = ThisDrawing.Application.preferences ' Retrieve the current AltFontFile value currAltFontFile = preferences.Files.AltFontFile MsgBox "The current value for AltFontFile is " & currAltFontFile, vbInformation, "AltFontFile Example" ' Change the value for AltFontFile newAltFontFile = "C:/AutoCAD/Fonts/gothice.shx" preferences.Files.AltFontFile = newAltFontFile MsgBox "The new value for AltFontFile is " & newAltFontFile, vbInformation, "AltFontFile Example" ' Reset AltFontFile to its original value preferences.Files.AltFontFile = currAltFontFile MsgBox "The AltFontFile value is reset to " & currAltFontFile, vbInformation, "AltFontFile Example"
End Sub
Comments? |