Jump to content
Developer Wiki and Function Reference Links ×

Attributes by class


Recommended Posts

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

Link to comment

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 by Patrick Winkler
  • Like 2
Link to comment
  • Marionette Maven

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 by MarissaF
Link to comment

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.

×
×
  • Create New...