What Is Missing At The End of This Macro?
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
What Is Missing At The End of This Macro?

 
Post new topic   Reply to topic    CADForums.net Forum Index -> MicroStation
Author Message
Guest






Posted: Mon Apr 11, 2005 9:06 pm    Post subject: What Is Missing At The End of This Macro? Reply with quote

Sub main


MbeCurrentTransform.dgnUnits
IF MbeSettings.TextLineLength = 101 THEN
PROC1
IF MbeSettings.TextLineLength = 102 THEN
PROC2
IF MbeSettings.TextLineLength = 103 THEN
PROC3
IF MbeSettings.TextLineLength = 104 THEN
PROC4
IF MbeSettings.TextLineLength = 105 THEN
PROC5

PROC1:
MbeSendKeyin "LV=6"
GoTo LABEL_NEXT
PROC2:
MbeSendKeyin "LV=19"
GoTo LABEL_NEXT
PROC3:
MbeSendKeyin "LV=31"
GoTo LABEL_NEXT
PROC4:
MbeSendKeyin "LV=44"
GoTo LABEL_NEXT
PROC5:
MbeSendKeyin "LV=56"

LABEL_NEXT:
MbeSendKeyin "CO=0"
MbeSendKeyin "WT=0"
MbeSendKeyin "LC=0"
MbeSendKeyin "RC=PROC.CEL"
MbeSendKeyin "AC=PV"
MbeSendCommand "/PACELR"

End Sub

Back to top
Teresa Zager
Guest





Posted: Tue Apr 12, 2005 1:25 am    Post subject: Re: What Is Missing At The End of This Macro? Reply with quote

Mark.Madsen@Bayercropscience.com wrote:
Quote:
Sub main


MbeCurrentTransform.dgnUnits
IF MbeSettings.TextLineLength = 101 THEN
PROC1
IF MbeSettings.TextLineLength = 102 THEN
PROC2
IF MbeSettings.TextLineLength = 103 THEN
PROC3
IF MbeSettings.TextLineLength = 104 THEN
PROC4
IF MbeSettings.TextLineLength = 105 THEN
PROC5

PROC1:
MbeSendKeyin "LV=6"
GoTo LABEL_NEXT
PROC2:
MbeSendKeyin "LV=19"
GoTo LABEL_NEXT
PROC3:
MbeSendKeyin "LV=31"
GoTo LABEL_NEXT
PROC4:
MbeSendKeyin "LV=44"
GoTo LABEL_NEXT
PROC5:
MbeSendKeyin "LV=56"

LABEL_NEXT:
MbeSendKeyin "CO=0"
MbeSendKeyin "WT=0"
MbeSendKeyin "LC=0"
MbeSendKeyin "RC=PROC.CEL"
MbeSendKeyin "AC=PV"
MbeSendCommand "/PACELR"

End Sub


Mark,

I am suspicious of that series of If statements at the beginning.
Shouldn't they look like this:

IF MbeSettings.TextLineLength = 101 THEN GOTO PROC1
IF MbeSettings.TextLineLength = 102 THEN GOTO PROC2
IF MbeSettings.TextLineLength = 103 THEN GOTO PROC3
IF MbeSettings.TextLineLength = 104 THEN GOTO PROC4
IF MbeSettings.TextLineLength = 105 THEN GOTO PROC5

Teresa Zager
Bentley
Back to top
Guest






Posted: Tue Apr 12, 2005 1:50 am    Post subject: Re: What Is Missing At The End of This Macro? Reply with quote

On 11 Apr 2005 10:06:22 -0700, Mark.Madsen@Bayercropscience.com wrote:

Quote:
Sub main


MbeCurrentTransform.dgnUnits
IF MbeSettings.TextLineLength = 101 THEN
PROC1
IF MbeSettings.TextLineLength = 102 THEN
PROC2
IF MbeSettings.TextLineLength = 103 THEN
PROC3
IF MbeSettings.TextLineLength = 104 THEN
PROC4
IF MbeSettings.TextLineLength = 105 THEN
PROC5

PROC1:
MbeSendKeyin "LV=6"
GoTo LABEL_NEXT
PROC2:
MbeSendKeyin "LV=19"
GoTo LABEL_NEXT
PROC3:
MbeSendKeyin "LV=31"
GoTo LABEL_NEXT
PROC4:
MbeSendKeyin "LV=44"
GoTo LABEL_NEXT
PROC5:
MbeSendKeyin "LV=56"

LABEL_NEXT:
MbeSendKeyin "CO=0"
MbeSendKeyin "WT=0"
MbeSendKeyin "LC=0"
MbeSendKeyin "RC=PROC.CEL"
MbeSendKeyin "AC=PV"
MbeSendCommand "/PACELR"

End If

End If
End If
End If
End If

Quote:
End Sub

HTH
Bill

Back to top
Guest






Posted: Tue Apr 12, 2005 3:30 pm    Post subject: Re: What Is Missing At The End of This Macro? Reply with quote

carver33@bellsouth.net wrote:
Quote:
On 11 Apr 2005 10:06:22 -0700, Mark.Madsen@Bayercropscience.com
wrote:

Sub main


MbeCurrentTransform.dgnUnits
IF MbeSettings.TextLineLength = 101 THEN
PROC1
IF MbeSettings.TextLineLength = 102 THEN
PROC2
IF MbeSettings.TextLineLength = 103 THEN
PROC3
IF MbeSettings.TextLineLength = 104 THEN
PROC4
IF MbeSettings.TextLineLength = 105 THEN
PROC5

PROC1:
MbeSendKeyin "LV=6"
GoTo LABEL_NEXT
PROC2:
MbeSendKeyin "LV=19"
GoTo LABEL_NEXT
PROC3:
MbeSendKeyin "LV=31"
GoTo LABEL_NEXT
PROC4:
MbeSendKeyin "LV=44"
GoTo LABEL_NEXT
PROC5:
MbeSendKeyin "LV=56"

LABEL_NEXT:
MbeSendKeyin "CO=0"
MbeSendKeyin "WT=0"
MbeSendKeyin "LC=0"
MbeSendKeyin "RC=PROC.CEL"
MbeSendKeyin "AC=PV"
MbeSendCommand "/PACELR"

End If
End If
End If
End If
End If

End Sub

HTH
Bill
Back to top
Guest






Posted: Tue Apr 12, 2005 3:31 pm    Post subject: Re: What Is Missing At The End of This Macro? Reply with quote

Thanks for your help.
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> MicroStation All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB