michaelk Posted July 13, 2016 Share Posted July 13, 2016 What's the trick to getting objects created w/ VS (and their sub objects) to use class attributes and textures? I've tried a couple things: NameClass(TargetClass); SetClUseGraphic(TargetClass,TRUE); … create object … That doesn't do it. I've also tried creating the object first and then SetClass(H,TargetClass); (TargetClass is an existing class with Use at Creation checked.) As always, a million thanks. mk Quote Link to comment
Patrick Winkler Posted July 13, 2016 Share Posted July 13, 2016 (edited) Hi Michael, this function sets all the attributes of the object by class: def setStyleByClass(h): """ Dem Object die Stil-Attribute der Klasse zuweisen """ # Füllstil vs.SetFPatByClass(h) # Füllfarbe vs.SetFillColorByClass(h) # Durchsichtigkeit vs.SetOpacityByClass(h) # Linienstil vs.SetLSByClass(h) # Linienstärke vs.SetLWByClass(h) # Stiftfarbe vs.SetPenColorByClass(h) # Textstil #vs.SetTextStyleByClass(h) # Marker vs.SetMarkerByClass(h) Is this what you need? Edited July 13, 2016 by Patrick Winkler 2 Quote Link to comment
michaelk Posted July 13, 2016 Author Share Posted July 13, 2016 Yes. Thanks. I thought there was a global byClass setting. mk Quote Link to comment
michaelk Posted July 14, 2016 Author Share Posted July 14, 2016 I don't see a SetTextureByClass(h) Am I missing something? mk Quote Link to comment
Marionette Maven Marissa Farrell Posted July 14, 2016 Marionette Maven Share Posted July 14, 2016 (edited) I don't have a complete answer, but if you look at this page on the Dev Wiki, Pat Stanford made some comments a while back on how to get an object to texture by class. SetTextureRef Hopefully this helps? EDIT: You may want to use vs.SetTextureRefN, but I don't know that the same "-1" method applies, as I haven't tried. Edited July 14, 2016 by MarissaF Quote Link to comment
michaelk Posted July 14, 2016 Author Share Posted July 14, 2016 Marissa That's very helpful! SetTextureRef did it. When it stops working I'll figure out what a TextureLayerID is and use SetTextureRefN. mk 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.