Jump to content

Vectorlab, Handle/Object Types and Sub Types


Recommended Posts


There's a great resource on the vectorlabs website, regarding object types;


The article talks about Object Types and Object SubTypes,

how do you get handles to subtypes?

or subtype objects?

For example, from the dev wiki


A table shows that,

Sheet Layer Viewport,Section Viewport have subtypes of 506, 507.

However if you check the handle type of a Sheet Layer Viewport using vs.GetTypeN(h) it still returns 122, how do you check the subtype of a viewport?

Kind regards


Link to comment

Found it!

On the same vectorlab website :


Many useful routines, am in the process of converting them to python,

trying to figure whats the best way to setup the modules, via classes by category or modules by category..

will post updates when done, thankgs again Orso.

The subtype was actually a workaround? i think

{ Orso *********************************************** }
{ returns the type or subtype of an object as integer }
	H_SubType := Str2Num(EvalStr(h, (IF(((ST)=-1), (T), (ST)))));

my conversion attempt to python

def sub_objType(h):
   crit_check = "IF((ST)=-1, (T), (ST))"
   num = vs.Eval(h, (crit_check))
   h_subtype = int(num)
   return h_subtype

  • Like 1
Link to comment
  • 4 years later...

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.

  • Create New...