RhinoDoc.CreateHeadless doesn't create document layouts

Hi All,

I’m trying to create a new document using RhinoDoc.CreateHeadless(TemplateName) with a template path supplied.

I’m finding that some elements of the template are used (layers etc), but others (Layouts) are not.

The goal is to have a template that includes a predefined layout with a drawing border (+ common notes etc) and detail view. Then, I create a new drawing with that template, create my geometry, then save and close.

What do I need to do to get the layouts to persist from the template?

If I create a new file using the same template manually (file > new) then it works as expected, but not through RhinoDoc.CreateHeadless(TemplateName).

Any suggestions?

Hi @Gerrard_Hickson,

I am able to repeat this - I’ve logged the issue.

https://mcneel.myjetbrains.com/youtrack/issue/RH-81601

Thanks for reporting.

– Dale

Hi @Dale,

Same problem with RhinoDoc.Create(TemplateName) - Not Headless.

How do I create a new document from template with Layout views?

Regards

Hi Gerrard,
Headless docs currently do not create any views (including layouts). This is something we are still trying to figure out how to properly do.

Thanks,
-Steve

Is there a workaround?

Not at the moment

Hi All,

I’m having issues creating layouts using the AddPageView - could these issues be related?
Link: AddPageView has no effect - #5 by Gerrard_Hickson

Also - The issue on this post isn’t restricted to the CreateHeadless method - it also doesn’t create layouts using the Create method.

hi @stevebaer
as I mentioned in a similar topic here:

this would save us a lot of time.
I assume this is not on your short-term list of things to tackle I fear, right?

Thanks,
T.

Sorry, but that is correct. This has to take a back seat to several other projects being worked on at the moment.

Thanks @stevebaer.

For us this would really ease a lot of work…

What would be a possible solution/workaround here…
In my imagination a solution would be that maybe a new instance of Rhino could automatically be opened and the content would be pasted/imported there?
Or is there an easier solution?

What information are you trying to get from the layouts?

@stevebaer
I am collecting multiple items from a model.
Then I have set up something that attaches dimensions, etc… to these items.

I then want to import them into a template where I already took care of the detailviews, frame, title, etc…
Some of the information in the title should be filled as well automatically.
In short: we transform the model to a lot of productiondrawings.

In my approach now I tried to take the items created and put them into a headless doc, which is not possible right now.
The solution I use now is that I open a new file in the current Rhino instance and let everything create itself there. The document saves itself and I open the model again…

We do have this partially working in the Rhino 9 WIP now.