Jump to content

Checking Type of Variable

Recommended Posts


import vs
number = "123"
vs.Message("Type=", type (number) )

returns : "Types =" instead of "Types =int"  ?


Edited by alberto72

Share this post

Link to post

by putting 123 in quotes you are telling python to regard it as a string.


Also for the message dialog I believe you have to convert  to string so this code should work:

import vs
number = 123
vs.Message("Type=" + str(type (number)))


Share this post

Link to post

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.

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.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...