AutoCAD Lisp Request error confirmation.

AutoCAD Lisp Request error confirmation.

khnam
Contributor Contributor
1,054 Views
7 Replies
Message 1 of 8

AutoCAD Lisp Request error confirmation.

khnam
Contributor
Contributor

The attachment, Lisp, was not a problem with AutoCAD 2014.

AutoCAD 2019 issues errors.

Please Check.

 

 

; Main Program

(defun C:MSTYLE(/ pt z)
(setvar "cmdecho" 0)
(command "STYLE" "DIMTEXT" "돋움체" "0" "1" "0" "N" "N" )
(command "STYLE" "DODUM" "돋움체" "0" "1" "0" "N" "N" )
(command "STYLE" "DULIM" "굴림체" "0" "1" "0" "N" "N" )
(command "STYLE" "BATANG" "바탕체" "0" "1" "0" "N" "N" )
(PROMPT (STRCAT "\N MAKE ALL STYLE"))
(SETVAR "CMDECHO" CMD)
(PRIN1)
)
(c:MSTYLE)

 

 

0 Likes
1,055 Views
7 Replies
Replies (7)
Message 2 of 8

Kent1Cooper
Consultant
Consultant

@khnam wrote:

The attachment, Lisp, was not a problem with AutoCAD 2014.

AutoCAD 2019 issues errors.

....


 

What errors?  Does it succeed in creating the Styles anyway?

 

It lists two localized variables that are never set and never used ['pt' and 'z'].  And [the most likely cause of an error] it tries to use a variable that is never set  ['cmd', which also is not listed as a localized variable].  But that would also have been a problem in Acad2014, unless you're not including the entire routine here -- I suspect maybe you are not, because of those two localized variables that do not exist in the code.

 

Also, it wouldn't cause an error, but the (strcat) function is extraneous if you're not putting together more than one text string.

Kent Cooper, AIA
Message 3 of 8

khnam
Contributor
Contributor

On CAD2019 It is not loaded.

 

The font file does not exist.

Unknown command "0". Press F1 for help.

Unknown command "1". Press F1 for help.

Unknown command "0". Press F1 for help.

Unknown command "N". Press F1 for help.

Unknown command "N". Press F1 for help.

The font file does not exist.

0 Likes
Message 4 of 8

dbhunia
Advisor
Advisor

First Keep this  "바탕체.shx"  file in the path ".......\Autodesk\AutoCAD 2019\Fonts" in your system then try.

 

 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 5 of 8

khnam
Contributor
Contributor

It does not recognize the .ttc file, which is a Windows font.

0 Likes
Message 6 of 8

khnam
Contributor
Contributor
Command: STYLE Enter the name of the character style or [?] <DODUM>: DULIM
Existing style. Full font name = Arial Narrow
Specifying the font name or font file name (AH) <Arial Narrow>: Specifying the character height or [Annotation (A)] <0.0000>: 0 Specifying the width ratio <1.0000>: 1
Specify the tilt angle <0>: 0 Do you want to reverse the characters? [Yes (Y) / No (N)] <No>: Do you want to flip the N character upside down? [Yes (Y) / No (N)] <No>: N
Now "DULIM" is the current character style.
Command: STYLE Enter the name of the character style or [?] <DULIM>: BATANG
New style.
Specify a font name or font file name (SHX) <txt>: Bahnschrift
The font is not available.
Command: 0 Unknown command "0". Press F1 for help.
Command: 1 Unknown command "1". Press F1 for help.
Command: 0 Unknown command "0". Press F1 for help.
Command: N Unknown command "N". Press F1 for help.
Command: N Unknown command "N". Press F1 for help.
Command: N MAKE ALL STYLE; Error: AutoCAD variable setting rejected: "CMDECHO" nil
0 Likes
Message 7 of 8

dbhunia
Advisor
Advisor

@khnam wrote:
Command: STYLE Enter the name of the character style or [?] <DODUM>: DULIM
Existing style. Full font name = Arial Narrow
Specifying the font name or font file name (AH) <Arial Narrow>: Specifying the character height or [Annotation (A)] <0.0000>: 0 Specifying the width ratio <1.0000>: 1
Specify the tilt angle <0>: 0 Do you want to reverse the characters? [Yes (Y) / No (N)] <No>: Do you want to flip the N character upside down? [Yes (Y) / No (N)] <No>: N
Now "DULIM" is the current character style.
Command: STYLE Enter the name of the character style or [?] <DULIM>: BATANG
New style.
Specify a font name or font file name (SHX) <txt>: Bahnschrift
The font is not available.
Command: 0 Unknown command "0". Press F1 for help.
Command: 1 Unknown command "1". Press F1 for help.
Command: 0 Unknown command "0". Press F1 for help.
Command: N Unknown command "N". Press F1 for help.
Command: N Unknown command "N". Press F1 for help.
Command: N MAKE ALL STYLE; Error: AutoCAD variable setting rejected: "CMDECHO" nil

 

This message "This Font not available." shows only at that time if your font file (*.SHX) is not present at the location ".......\Program Files\Autodesk\AutoCADXXXXXX\Fonts".......

 

You can copy those *.SHX files from location ".......\Program Files\Autodesk\AutoCAD 2014\Fonts" to ".......\Program Files\Autodesk\AutoCAD 2019\Fonts" then try....... 


Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
Message 8 of 8

scot-65
Advisor
Advisor
(if (setq a (findfile "DIMTEXT.shx"))
(command "STYLE" a "돋움체" "0" "1" "0" "N" "N" )
(alert "Style 'DIMTEXT' is not in your support path.")
);if

Adjust file extension as required [shx/ttf/ttc].
Repeat for each style you wish to load.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes