twk Posted August 26, 2018 Share Posted August 26, 2018 Trying to figure out how to interpret values derived from this function: fill_style = vs.GetVPClOvrdFillStyle(viewport_handle, class_name) Description says it returns the fill style of that class that has been overridden in the viewport. However whenever I set the class override to a Hatch, it returns a negative index value. Changing the hatch, returns a different negative index value; Tried using the Index2Name function to try and retrieve the hatch name being applied, but it returns nothing. Does anyone know how to convert these return values to the name of the hatch. By the way, from my testings return values are: 1 = Solid Fill 0 = No Fill 3 = Pattern Cheers, Tui Quote Link to comment
JBenghiat Posted August 28, 2018 Share Posted August 28, 2018 The return indices, starting with 0, should be: None Solid Pattern Hatch Tile Gradient Image RetainOriginal It's possible that the VS implementation of this also returns the item index. Try converting it to name with: vs.VectorFillList() Quote Link to comment
twk Posted August 28, 2018 Author Share Posted August 28, 2018 (edited) Nope, When a class override is set to use a pattern, it returns 3. fill_style = vs.GetVPClOvrdFillStyle(vp.viewport_handle,class_name) However, it was returning negative index values for either a Hatch/Tile/Image/Gradient, using vs.Index2Name(-fill_style), returned the name of the resource, then using vs.GetTypeN(vs.GetObject(vs.GetName))), returned the type of resource. whew, what a mission.. but it works, Thanks for the input Josh. -- CORRECTION 0 - None 1 - Solid (Back) 2 - Solid (Fore) 3 and above - Indexes of the Patterns anything below 0 (negatives) use vs.Index2Name with negative mod applied. cheers, Tui Edited August 28, 2018 by twk correction Quote Link to comment
Recommended Posts
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.