Jump to content
Julian Carr

Getting the Fill Type Used By an Object

Recommended Posts

Anyone know how to get the type of fill (hatch, tile or image) associated with an object? I know that GetFPat() will return a negative number for these fill types and you can get the name of the fill using GetVectorFill(), however this doesn't give you the fill type. There must be a way??

 

Thanks,

 

Julian

Share this post


Link to post

I think I worked it out but the result is odd. Using GetVectorFill() you can get the name of the fill. Then using GetType(GetObject(FillName)), you get the object type as follows:

 

Hatch: 66

Tile: 108

Image: 119

Gradient: 120

 

 

Here is the test code I used, which works on the fill of the selected object:

 

Procedure T;
VAR
    h : HANDLE;
    s1 : STRING;
    n : LONGINT;
    Flag : BOOLEAN;
BEGIN
    h := FSActLayer;
    n := GetFPat( h );
    s1 := Index2Name(n);
    Flag := GetVectorFill(h, s1);
    message( n , '  ', s1, '  ', GetType(GetObject(s1)));
END;
Run(T);

 

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.

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.


 

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