Details with Rhinocommon plugin

Hi there

I am having an issue with details and layouts as a plugin.

I have a code attached which when I run through EditPythonScript does what is required and makes a layout with a detail and sets the detail scale at 1:25

when i call on this script as a rhino command it runs, but the new detail does not scale to 1:25

This is a small part of a much larger code which i run as a plugin and the rest works fine. Ive played around for a while but am not sure what the problem is.

To be clear, my issue is that while this code works as a script, it does not set the detail scale right as a command.

layout_detail.py (803 Bytes)

Any help is appreciated

Thanks

Hi,
When you write ‘call this script as a rhino command’, do you mean by calling like this:
-RunPythonScript "PATH TO layout_detail.py"?

Sorry, no i mean I have made a plugin like this:

and make a command file that calls my script