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.
https://developers.maxon.net/forum/topic/8036/10449_xref-python-commandIs 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?
EDITED:
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.GetObjectLink(rocket) 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) box.SetName("new") doc.InsertObject(box) doc.InsertObject(op) c4d.EventAdd()
-
On 20/10/2014 at 00:59, xxxxxxxx wrote:
Hello,
Due to some limitations it is currently not possible to set the filename parameter of a Xref object in Python.
Best wishes,
Sebastian -
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.