.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Creating multi-line Mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
163 Views, 5 Replies
09-27-2007 08:34 AM
I'm having trouble getting an mtext entity with multiple lines of text. I've tried adding vbCrLf, vbLf, vbCr, \P, \n to the Text property but the end result is always a single, wrapping line of text in the mtext entity.
Anyone have an idea what I'm missing?
Thanks in advance.
Anyone have an idea what I'm missing?
Thanks in advance.
Re: Creating multi-line Mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-27-2007 11:42 AM in reply to:
Jim Dowthwaite
i use vbcrlf all the time with mText, and i haven't had any issues. perhaps you could provide the code in question.
Re: Creating multi-line Mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-27-2007 12:45 PM in reply to:
Jim Dowthwaite
I can't put all the code here due to privacy policies in my company but I have posted the mtext creation bit below...
...code above...
Dim PtA As Geometry.Point3d = oEd.GetPoint(vbCrLf & vbTab & "Select Note Insertion Point: ").Value
Dim strText As String = cboSeries.Text & vbCrLf & cboStyle.Text & vbCrLf & cboType.Text & vbCrLf & cboExtra.Text
Dim oMtext As New MText
With oMtext
.Width = 300.0
.TextHeight = 8.0
.Location = PtA
.Attachment = AttachmentPoint.MiddleCenter
.SetContentsRtf(strText)
End With
oBtr.AppendEntity(oMtext)
oTrans.AddNewlyCreatedDBObject(oMtext, True)
End If
...code below...
Hopefully it's something stupid I'm overlooking.
...code above...
Dim PtA As Geometry.Point3d = oEd.GetPoint(vbCrLf & vbTab & "Select Note Insertion Point: ").Value
Dim strText As String = cboSeries.Text & vbCrLf & cboStyle.Text & vbCrLf & cboType.Text & vbCrLf & cboExtra.Text
Dim oMtext As New MText
With oMtext
.Width = 300.0
.TextHeight = 8.0
.Location = PtA
.Attachment = AttachmentPoint.MiddleCenter
.SetContentsRtf(strText)
End With
oBtr.AppendEntity(oMtext)
oTrans.AddNewlyCreatedDBObject(oMtext, True)
End If
...code below...
Hopefully it's something stupid I'm overlooking.
Re: Creating multi-line Mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-27-2007 12:50 PM in reply to:
Jim Dowthwaite
Sounds like a crappy company 
set
.setContentsRtf(strText)
to
.Contents = strText
-Mark Pendergraft
set
.setContentsRtf(strText)
to
.Contents = strText
-Mark Pendergraft
*Luis Esquivel
Re: Creating multi-line Mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-27-2007 12:51 PM in reply to:
Jim Dowthwaite
>> .Width = 300.0
Change that number to an smaller value ie 4.0.... and see what happens.
Change that number to an smaller value ie 4.0.... and see what happens.
Re: Creating multi-line Mtext
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-27-2007 01:12 PM in reply to:
Jim Dowthwaite
Changing to .Contents = strText did the trick!
Thanks
Thanks
