Search code examples
lispautocad-pluginautolisp

Add Mtext with properties assigned


I'm looking to add mtext in my code, and I'm wondering what the _ calls (I assume) to set things such as Style, color, alignment, Text Height, position etc. to an mtext as I create it. How would I do that amidst something like (command "_.-mtext")?


Solution

  • Instead of using a command call, use either entmake or entmakex with an appropriate DXF data list - that way, you can supply the relevant DXF group value for Text Style, Colour, Text Height, Alignment etc. in a single call.

    There are hundreds of existing examples demonstrating the use of entmake/entmakex.