twk Posted June 11, 2016 Share Posted June 11, 2016 Greetings There's a great resource on the vectorlabs website, regarding object types; http://www.vectorlab.info/index.php?title=Object_Types_Commented 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 http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix_D 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 Tui Quote Link to comment
twk Posted June 12, 2016 Author Share Posted June 12, 2016 Found it! On the same vectorlab website : http://www.vectorlab.info/index.php?title=Category:VectorScript_Subroutines 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 } FUNCTION H_SubType(h : HANDLE): INTEGER; BEGIN H_SubType := Str2Num(EvalStr(h, (IF(((ST)=-1), (T), (ST))))); END; 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 1 Quote Link to comment
_c_ Posted March 24, 2021 Share Posted March 24, 2021 How many years ago, incredible. 3 Quote Link to comment
drfoulk@gmail.com Posted July 14, 2023 Share Posted July 14, 2023 Yes. You work a problem evenings for a week then a month later find it solved in (6) year old post. It makes me wonder what stratosphere theses guys are in TODAY. 1 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.