Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding content to mtext

7 REPLIES 7
Reply
Message 1 of 8
davwong
531 Views, 7 Replies

Adding content to mtext

I am trying to add labels everywhere on my drawing to show the properties of my objects i.e. lines. (But the thing is, I need static text). This is because I need to be able to "distort" the drawing for legibility purposes but retaining the label information. This is a common drafting task in surveying. Solution A - add the labels and then convert then into text. (I don't think Autocad allows this) Solution B - add the mtext via script, but so far I am stuck on the text editor. Here's what I have done so far. mtext 100,100 <-- I'll need to come up with some calculation to automatically place the text in the middle of the line. Any help is appreciated. j mc r 96d08'27" 130,100 "186° 08' 27""" <-- how to you add the content of the mtext object???? I'm stuck here. and then Ctrl-Enter to quit the text editor.
7 REPLIES 7
Message 2 of 8
3wood
in reply to: davwong

Spoiler
 

Please try ADDLINES.vlx. It can add length and bearing to middle of selected lines.

Message 3 of 8
M_Hensley
in reply to: davwong

Instead of using mtext and dealing with the mtext editor would it work to just use text? You can answer all the prompts for justification, insertion point, rotation, etc. using script very easily. You are however limited to a single line of text.

Message 4 of 8
pendean
in reply to: davwong

Are you using plain AutoCAD?
Or a survey-capable version like AutocAd MAP or Civil?
Is there a reason you only want to use MTEXT?
Message 5 of 8
jggerth1
in reply to: davwong

As a _consumer_, not a regular creator or survey drawings, I can't tell you how much I hate getting in a CAD file from surveyor where the labeled line lengths are not the actuall lengths of the line.  Please, create your survey drawings on real-world coordinate systems (eg State Plane or local national equivalent) and provide me with a correct & accurate model.

 

No deliberate distortion is ever needed.  if the PoB is 22 klicks from the site, use multiple Viewports in the sheet, to show the PoB and site on a single layout, but use the correct line length and direction in modelspace.

Message 6 of 8
davwong
in reply to: pendean

No particular reason besides that I must create separate text objects if I want to change the labels from bearing [space] distance above the line to bearing [new line] distance and move the 2 row mtext so that the line goes between the two rows.
Message 7 of 8
davwong
in reply to: jggerth1


@jggerth1 wrote:

As a _consumer_, not a regular creator or survey drawings, I can't tell you how much I hate getting in a CAD file from surveyor where the labeled line lengths are not the actuall lengths of the line.  Please, create your survey drawings on real-world coordinate systems (eg State Plane or local national equivalent) and provide me with a correct & accurate model.

 

No deliberate distortion is ever needed.  if the PoB is 22 klicks from the site, use multiple Viewports in the sheet, to show the PoB and site on a single layout, but use the correct line length and direction in modelspace.


Ah yes, how I wish! I can spend all day talking about how much I agree with you! It would make my life much easier too! I create the drawings exacly from data and then spend so much time to distort it due to legibility reasons. Unfortunately, I can't see how this can be possible in a paper based system without at least 10 pages when it could have been only 1. Plus it's local convention here. Hopefully one day we can fully move to a purely LandXML based system where we just have to input instrument setups, observations, record any remarks, etc. Hopefully, we won't need AutoCAD then. 🙂

Message 8 of 8
davwong
in reply to: 3wood

I have discovered that simply copying and pasting works into model space works and lee-mac's excellent CurveAlignedTextV1-1 routines. Albeit, I would still prefer to write my own script to automatically output labels in the right rotation, and place.

 

I haven't figured out how to get past the in-built text editor when I invoke the "mtext" or "text" command. I haven't got an opportunity to try yours yet since it seems to be a trialware (as stated at the bottom 5 lines only?).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost