TheSwamp

Code Red => VB(A) => Topic started by: Humbertogo on April 18, 2006, 07:30:38 AM

Title: remove Indention tap stop position from mtext
Post by: Humbertogo on April 18, 2006, 07:30:38 AM
Is there a way to remove Indention tap stop position from mtext, the indention position is not always the same.

Using vba

for example:
 \pi-0.875,l0.875;1.HALLO TEST
Need to remove \pi-0.875,l0.875;  from the Mtext the indention position is not always the same.
Title: Re: remove Indention tap stop position from mtext
Post by: joseguia on April 18, 2006, 09:14:21 AM
Is there a way to remove Indention tap stop position from mtext, the indention position is not always the same.

Using vba

for example:
 \pi-0.875,l0.875;1.HALLO TEST
Need to remove \pi-0.875,l0.875;  from the Mtext the indention position is not always the same.


Hmm - not sure but it sounds like you want something like this?

Code: [Select]
Function FndText(strString As String)
  On Error GoTo Err_Control

  Dim Lng As Integer
  ' Searches string for ";" and returns everything to the Right
  ' If no ";" found returns original string
 
  Lng = InStr(strString, ";")
    If Lng > 0 Then
     
      FndText = Right(strString, (Len(strString) - Lng))
    Else
      FndText = strString
    End If

Exit_Here:
  Exit Function
Err_Control:
  Select Case Err.number
  'Add your Case selections here
    Case Else
    MsgBox Err.Description
    Err.Clear
    Resume Exit_Here
  End Select
End Function

sample use:

Code: [Select]
FndText "\pi-0.875,l0.875;1.HALLO TEST"

returns:
1.HALLO TEST
Title: Re: remove Indention tap stop position from mtext
Post by: joseguia on April 18, 2006, 09:15:22 AM
Something tells me you need more than just that .. right?
Title: Re: remove Indention tap stop position from mtext
Post by: Humbertogo on April 18, 2006, 09:40:41 AM
Thanks ,
i will do some more investigation
Title: Re: remove Indention tap stop position from mtext
Post by: Bryco on April 18, 2006, 10:59:18 AM
What version Acad Humbertogo?
On acad 2006 I get
\pi-0.75,l0.75,t0.75;1. vhkas\P2.   oiibdf\P3.  qwe
I'm thinking the | and the t do some magic to set the tab spacing.
You don't seem to have that part.
I know on 2000 with a funky text like architxt I could never get it nice
but 2006 is always good.
Title: Re: remove Indention tap stop position from mtext
Post by: Humbertogo on April 19, 2006, 01:34:06 AM
Quote
What version Acad Humbertogo
We use Autocad Mechanical 2006