乐筑天下

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

typename(object)返回什么STRING?

[复制链接]

6

主题

13

帖子

1

银币

初来乍到

Rank: 1

铜币
37
发表于 2003-8-27 16:49:00 | 显示全部楼层 |阅读模式
Sub GetEntity2()
    Dim retEnt As Object
    Dim pnt As Variant
   
    On Error Resume Next
   
    ' The following example waits for a input from user and returns the Line in retEnt
    ThisDrawing.Utility.GetEntity retEnt, pnt, "Select an object"
    If Err  0 Then
        Err.Clear
        MsgBox "You need to select an existing object"
    Else
        Select Case LCase(TypeName(retEnt))       //该怎么写?
        Case "acdbcircle"                                     //返回什么串才对?
               MsgBox "Circle"
         Case "acdbline"                                       //返回什么串才对?
               MsgBox "Line"
        
        Case Else
               MsgBox "others"
        End Select
      end if   
end sub
回复

使用道具 举报

7

主题

63

帖子

5

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
91
发表于 2003-8-27 17:25:00 | 显示全部楼层
LCase(TypeName(retEnt))改为:
retEnt.EntityName
acdbcircle改为AcDbCircle,余同。
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-14 16:27 , Processed in 2.629643 second(s), 57 queries .

© 2020-2025 乐筑天下

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