悬赏已过期 后悬赏过期
悬赏

中望.Net中PromptKeywordOptions对象的一个bug

邀请:

昨晚学会了用PromptKeywordOptions添加keywords【昨晚的帖子】,想着今晚上实现以下,结果因为中望.Net中PromptKeywordOptions对象的一个bug折腾了一晚上——最后还是换了ACAD才发现问题所在。

下面的代码在ACAD中是正常的,但是在ZWCAD中,只能获取第一个keyword的值。

        ' 创建 PromptKeywordOptions 实例并设置关键词
        Dim promptString As New PromptKeywordOptions(vbCrLf & $"选择管线类型")
        ' 正确添加关键词项,键值是显示的名称,值是对应的选择标识符
        promptString.Keywords.Add("SC-1钢管", "SC-1钢管")
        promptString.Keywords.Add("SC-2钢管", "SC-2钢管")

        ' 获取用户选择的选项
        Dim result As PromptResult = ed.GetKeywords(promptString)
        If result.Status <> PromptStatus.OK Then
            Return
        End If
        ' 检查用户选择的状态
        If result.Status = PromptStatus.OK Then
            wipeLineType = result.StringResult.Replace("-", "×")
        End If

ZWCAD中的效果,不能正确获取keyword:

ACAD中的效果:

收藏0
分享
您的回答

回答

默认排序 时间排序
图片审查中...
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
复制链接
微信扫码
已复制到剪贴板