MPlot(Mypointlist, Mnamestr, Mpoint3dL)
' MsgBox(Realplot & "--" & iStep & "---" & Mss.Count)
' Pause(5)
If Not Realplot Then
If iStep < Mss.Count Or (iStep = Mss.Count And Listdwg.Count > 0) Then
Dim pKeyOpts As PromptKeywordOptions = New PromptKeywordOptions("")
pKeyOpts.Message = vbLf & "是否预览下一张? "
pKeyOpts.Keywords.Add("Y(是)")
pKeyOpts.Keywords.Add("N(否)")
pKeyOpts.Keywords.Default = "Y(是)"
pKeyOpts.AllowNone = True
' MsgBox("ddd")
Dim pKeyRes As PromptResult = ed.GetKeywords(pKeyOpts)
' MsgBox("ddd")
Dim Mopstr As String = pKeyRes.StringResult
If Mopstr = "" Then Mopstr = "N(否)"
If Mopstr = "N(否)" Then
Previewnext = False
Exit For
Else
Previewnext = True
End If
End If
End If
PBar.Value = iStep
Label3.Text = (PBar.Value / PBar.Maximum).ToString("#0%", CultureInfo.InvariantCulture)
System.Windows.Forms.Application.DoEvents()
Next
Catch ex As Exception
Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(ex.Message & vbCr & ex.StackTrace & vbCrLf & "程序出错请联系作者!")
End Try
Above is the small part of my code. The code work well in the CAD 2008 , Well ,in the CAD2012
' MsgBox("ddd")
Dim pKeyRes As PromptResult = ed.GetKeywords(pKeyOpts)
' MsgBox("ddd")
this code just doesn't work. In fact it worked but Canceled by the CADself !! Just like I put in the ESC key! It doesn't stop to let you choose Y or N just be Canceled , It's so weird!! I Get the code out of my programm and debug the part code alone It just work well !
All the code works well in the CAD2008! Just CAD2012, do you have run into the same problem ? Can you give some suggtions? Thank you !
Hi,
Such automatic cancelling of input or commands is usually associated with fiber switching in AutoCAD.
Fibers are being removed in a phased manner in AutoCAD in the recent releases and this could be reason for the same code to work in AC 2008 while it does not in AC 2012.
Can you please provide us a sample buildable project that has the same structure of your application ?
For example, how is the code snippet that you have shown get called in your actual app and so on ?
This will help us reproduce the issue and try and find another way to get the whole thing working.
Also, you may try creating a command out of the code that you have shown and then invoke it using "SendStringToExecute" in your main application.
Also, is it specific to the use of chinese characters ? From the description that you provided, I guess it is not.