Error message when using ExportLayerObjects script

When I try to export objects through script, I get this error window. What’s the problem?

Hello - can you test this with a file that is on the desktop, just to see if it basically works with local files? I’m not sure how it interacts with OneDrive, I’ll test that.

Hmm - it seems to work here. I’m not sure what may be happening.

-Pascal

Same problem…

Hello - are there linked blocks in this file by any chance? I don’t think the script takes that into account at all…

-Pascal

I’m not sure… How can I check that?

Hello - run BlockManager and look for entries - (if there any blocks at all, I am just guessing) - that indicate they are linked -

image

-Pascal

There are no blocks in this file.

Very odd… can you please try making a new file, put a couple of things on different layers save it someplace, and test in that file? Right off hand I am drawing a blank as to what is going wrong - I think it ought to work even if your file is opened as ‘read only’.
And can you please post the rvb file that you are using? Just to be sure we’re testing the same code.

-Pascal

It works! It seems my file has problems…

If you can send the file to tech@mcneel.com to my attention, I’ll take a look. SaveSmall and Zip, and if the file is still large, send via www.rhino3d.com/upload

thanks,

-Pascal

I send a file. File’s size is about 80Mb. Thank you so much about your kindness.

Hello - I can’t access that download - can you please try http://www.rhino3d.com/upload ?

@tntndi001 - thanks, I got the file and here the script works - 72 files exported… Just to be sure, can you post the actual rvb file that you are using?

thanks,

-Pascal

I uploaded file. Thanks.

Did you receive rvd file? I think there is no problem about that.

Hello - no, I did not get your version of the rvb. I asked for it because the one I have is called
ExportLayerObjects_PG.rvb and that name with PG usually means I have modified someone else’s file and then saved it, so we may not have the same script,
Please just attach it here to your response by drag and drop or using the upload button above ^.
image

-Pascal

Oh ex.rvb (1.2 KB)
I think I found reason. If there is an object in the sub layer, I get an error. But unfortunately I don’t know how to solve this.

Yes, that is a different script - please try this one, attached.
ExportLayerObjects_PG.rvb (3.0 KB)
Apparently I fixed it to accommodate nested layers and I added a file format option as well, it looks like.

-Pascal

image Here is another error…

I can only guess that there is a language and text formatting problem occurring, possibly? I do not see a layer in the file you sent that looks like the file indicated in the error message, so perhaps you’re testing a different file? If so, please test the file you sent to me and let’s see what the error message looks like there.

-Pascal

It works fine when I export format to 3dm file. However, if I select another format, an error occurs.