乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 44|回复: 2

请问如何在命令行交互输入字符串?

[复制链接]

25

主题

77

帖子

3

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
177
发表于 2005-11-14 10:32:00 | 显示全部楼层 |阅读模式
请问如何在命令行交互输入字符串?我想对某一层进行操作,用"Getstring",输入层名时总是出错。
回复

使用道具 举报

32

主题

651

帖子

8

银币

中流砥柱

Rank: 25

铜币
779
发表于 2005-11-14 16:49:00 | 显示全部楼层
&ltRE class=Code>Utility.GetString&ltRE class=Code>AutoCAD里有帮助&ltRE class=Code>Sub Example_GetString()
    ' This example demonstrates different ways of returning a string
    ' entered by a user.
   
    Dim returnString As String
   
    ' Prompt & Input cannot contain blanks
    returnString = ThisDrawing.Utility.GetString(False, "Enter text (a space or  terminates input): ")
    MsgBox "The string entered was '" & returnString & "'", , "GetString Example"
   
    ' Prompt & Input can contain blanks
    returnString = ThisDrawing.Utility.GetString(True, "Enter text ( terminates input):")
    MsgBox "The string entered was '" & returnString & "'", , "GetString Example"
   
    ' Prompt & Input can contain blanks, but not an empty string
    Dim NoNull As Integer
    NoNull = 1    ' Disallow null
    ThisDrawing.Utility.InitializeUserInput NoNull
    returnString = ThisDrawing.Utility.GetString(True, "Enter text ( terminates input): ")
    MsgBox "The string entered was '" & returnString & "'", , "GetString Example"
End Sub
回复

使用道具 举报

25

主题

77

帖子

3

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
177
发表于 2005-11-15 13:22:00 | 显示全部楼层
谢谢
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-7-4 18:48 , Processed in 0.944572 second(s), 58 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表