Import layouts Plug-in using C#

Hello,

I am trying to import layouts from one file into another by making a custom command using C# in Visual Studio.

Here is a screenshot of the output in VS:

The output checks for the following:
(1) Layouts in working file (null) - since there are no layouts currently in the file.
(2) Layouts in ‘import-file’: A list of layouts in the file from where I want to import the layouts.
(3) Finally the code prints all the layouts that got imported from the ‘import-file’
This list is accurate!

However, when Rhino executes the command, it imports duplicate ‘graphic’-layout and does not import the ‘36" x 48"’ layout.
Here is a screenshot from Rhino:
image

I am using this command to load the layouts:

Not sure if this is a bug? Or if I need to check the code.

Thanks for the help!

Can you provide us a way of duplicating what you are seeing?

– Dale