Jump to content

How to set Hatch Pattern by sdk?

Recommended Posts

VWObject errorBox(gSDK->CreateRectangle(WorldRect(WorldPt(0,0),WorldPt(1000,1000))));
InternalIndex hatchIndex;
gSDK->NameToInternalIndexN("ErrorHatch",  hatchIndex);
//VWPattern hatchPat(hatchIndex);

Hello there,

I would like to add a hatch pattern that exists in my resource browser to my 2D rectangle (as if I would just drag and drop), but this does not work, what am I doing wrong?  

Edited by Nebeor

Share this post

Link to post

If I remember well and if I am not mixing it up with something else, you have to use -hatchIndex to set an hatch.


(I cannot find back a discussion I have in mind, so probably it was a private email exchange and not a post in this forum or in the old SDK mailing list.)

Share this post

Link to post

Thanks @Nicolas Goutte but,

Isn't that just what i'm trying to do?

what do you mean with the '-' before hatchIndex?, I'm thinking I have to set a variable somewhere.

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