Start a new topic

issues with mgGetAttRec in python script running in Creator

I am trying to do some python scripting in creator.

I want to get object attributes (fltObjNoDay, fltObjNoDusk, fltObjNoNight).

I can get them with this:


numAttr = mgGetAttList(rec,fltObjNoDay, fltObjNoDusk, fltObjNoNight)


However, I thought I wanted each attribute individually.  So how would I do this via mgGetAttRec instead?  It wants 3 parameters, and I don't have any record to pass to recOut.

mgGetAttRec returns a pointer to the attribute record identified by rcode from rec. Use this function to retrieve an attribute record as opposed to an attribute value. Use mgGetAttList to retrieve an attribute value.

If you specify MG_NULL for recOut, a new record will be allocated and returned. If you specify a valid mgrec* for recOut, the record retrieved will be copied into recOut. In this way, you can reuse records.

If the attribute record you want to retrieve is an extension record, use mgGetExtRec instead.

Note: Any recOut that you pass in must have been returned from a previous call to mgGetAttRec or must be MG_NULL. This ensures that the contents of other records do not inadvertently get overwritten.

For now I think I'm just going to have to deal with mgGetAttList but I'd like to know how to do each one individually.



Login to post a comment