Jump to content

Command text


MajorTom

Recommended Posts

When I use the text command in Autolisp, my current dwg works well, but when I try a different dwg (which is a drawing in a previously worked dwg.), I think it wants the "width" input. how can I solve this situation.

 

Thanks in advance :)

Link to comment
Share on other sites

4 hours ago, MajorTom said:

When I use the text command in Autolisp, my current dwg works well, but when I try a different dwg (which is a drawing in a previously worked dwg.), I think it wants the "width" input. how can I solve this situation.

 

Thanks in advance :)

Sounds like the Justification is set to Fit, it's saved in each drawing.

TEXTJUSTIFY (System Variable) https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-Core/files/GUID-223C6FB9-B498-4BA9-8710-E1CB4889B8FC-htm.html

  • Like 1
Link to comment
Share on other sites

Not really, can you post a translation of the command prompt that you think wants the "width" input?

If the DTEXT Justification is set to Fit the command prompt would be "Specify first endpoint of text baseline:"

  • Like 1
Link to comment
Share on other sites

2 hours ago, tombu said:

Not really, can you post a translation of the command prompt that you think wants the "width" input?

If the DTEXT Justification is set to Fit the command prompt would be "Specify first endpoint of text baseline:"

in this case what I have to add to my lisp routine.

 

Edited by MajorTom
Link to comment
Share on other sites

1 hour ago, tombu said:

(setvar 'TEXTJUSTIFY "Left")

will set DTEXT Justification to the default "Left". 

Woudn't worked I think it's about anotation text style or something like that but really I don't know how I get over this situation

Link to comment
Share on other sites

33 minutes ago, MajorTom said:

Wouldn't worked I think it's about annotation text style or something like that but really I don't know how I get over this situation

Again can you post an english translation of the command prompt that you think wants the "width" input?  No other way to figure out what's happening.

 

Annotative text wouldn't ever need "Height" entered, if your code included Height in the Text command call that would cause an issue.  It would have the same issue with any Text Style that had a Height not set to 0.

 

Test the Height of the current text style in your code with:

(cdr (assoc 40 (tblsearch "style" (getvar "textstyle"))))

If include Height

or don't include Height

Edited by tombu
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...