0

Software: AutoCAD 2012 (Japanese language)

System: MS Windows 7 (Japanese language)

I have made a .LSP file which defines a new function "C:MAKEATABLE".

I am trying to print a string which contains a tab character, using AutoLISP. But that character shows up as a question mark (?).

If I manually try to edit it (by double-clicking it, or using DDEDIT, or by TEXTEDIT ) it automatically gets converted to the tab character, which I require.

I don`t know which character encoding is being used (if that is causing a problem). The font being used is "txt.shx".

Things I have tried:

  • Used (chr 9) in concatenation with the rest of the string => still shows up as a question mark
  • tried to print the two parts of string (on either side of the tab) separately => not good, since I need that text as a single object
  • tried using "DDEDIT" function in the code => It requires the user to press enter at its every invocation, so not good.
    • I tried simulatinging the enter key using " " , "" , ";" , (terpri). Nothing works, it still prompts the user to select another object.
  • tried using "TEXTEDIT" function in the code => doesn`t do anything; says that," MAKEATABLE Unknown command "MAKEATABLE". Press F1 for help."
  • ran the same code on my English language PC and English version of AutoCAD 2012 => same problem if i use any of the .SHX fonts; but works fine if I use the other fonts like "Arial"

I might have missed a thing or two, so please let me know if any other information is required.

Govinda
  • 61
  • 11

1 Answers1

1

Perhaps a different approach:

Isn't your problem that you are trying to create a "SingleLine text" object in AutoCAD. These do not support TABs. You could try to use the "Multline Text" object instead.

Cheers, Alain

Alain
  • 304
  • 3
  • 9