Jump to content
Developer Wiki and Function Reference Links ×

Type 32?


Recommended Posts

I'm doing some experiments.  Trying to see if I can get the handle to a viewport starting with the handle of an object in the annotation space of that viewport.

 

GetTypeN(GetParent(h) ) returns 11 (Group)

 

GetTypeN of the parent of the above object returns type 32.  Type 32 isn't in the index but it's in the example code for GetType (not GetTypeN) as a header.  Is that object type outdated?

 

Why doesn't it return type 122 (viewport)?  What method do I need to do to get the viewport handle?

 

…and what's a header?  I don't see anything in the function reference that describes what a header is.

Link to comment

The parent of an object in the annotation space is the Annotation Group (Type 11=Group), Viewports have multiple components  of itself > Eg. https://developer.vectorworks.net/index.php/VS:GetVPGroup

 

To get the Viewport you use GetVPGroupParent (https://developer.vectorworks.net/index.php/VS:GetVPGroupParent).

 

-edit-

as to what a Header type is, I don't know.

 

Full type list of objects is in the C++ SDK. 

Edited by twk
  • Like 2
Link to comment

GetType and GetTypeN return the same constants. When VW introduces the concepts of planar objects (as opposed to 2D objects that were always in the screen plane), the way object types were stored needed to be changed, so the new version is more reliable in the current version of VW. Other than the behind-the-scenes change, the commands are identical.

 

The drawing header is the object that contains layers. You can't get a higher parent level than the header. It also contains everything that's not on a layer: resources, preferences, dimension styles, etc.

Link to comment

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.

Guest
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...