Jump to content

VBa - get the TypeOf an object


Recommended Posts



Q1. Is there a list of the objects that can be used in the line "if obj Typeof is xxxx?"


Q2. how to change a polyline width using VBA? I understand that there are many types of polylines so this is why I asked Q1.


Thank you

Link to comment
Share on other sites

Hi @katto01, if you define the variable which do you want to check as object and right click on mouse thenbwill be showed all types.

sub mychck()
dim Myobject as object
'get your object as you want by selection or picking on screen.
if typeof Myobject is Acadtext then
'do something
end if
end sub


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...