Create Xref with python

On 18/10/2014 at 11:53, xxxxxxxx wrote:

I've found a couple posts about this but no clear answers.

Is it possible to create an Xref object and pass in a file path using python rather than just opening the dialog to search for it? If so, does someone have a code snippet they can share?

I've got this going so far, but the filepath isn't updating. I guess maybe I need to load a file into the Xref object?

import c4d   
def main() :   
    op = c4d.BaseObject(c4d.Oxref)   
    rocket = "/component1.c4d"   
    op[c4d.ID_CA_XREF_FILE_SELECT] = "component1.c4d"   
    op[c4d.ID_CA_XREF_NAMESPACE] = "rocket"   
    op[c4d.ID_CA_XREF_GENERATOR] = 1   
    box = c4d.BaseObject(c4d.Ocube)   

On 20/10/2014 at 00:59, xxxxxxxx wrote:


Due to some limitations it is currently not possible to set the filename parameter of a Xref object in Python.

Best wishes,

On 21/10/2014 at 08:43, xxxxxxxx wrote:

Any idea of when this will be fixed?

On 21/10/2014 at 09:59, xxxxxxxx wrote:

Sorry, I don't know when this will be fixed.