IGES export level order


I’ve edited this since it’s original posting to reflect the effect of SetIGESLayerLevelMap

Problem: The order of modification of Rhino Layers is somehow included in the IGES file. Using setIGESLayerLevelMap works to map Rhino Layers to particular IGES levels (of course), but that does not affect this issue.

Background to problem/question:
I use Rhino to create IGES files for import into a Finite Element PreProcessor called LSPrePost.
Given the right circumstances (which are that each IGES level has a color significantly different than all the other IGES levels), LSPrePost retains the IGES entities in the IGES levels in which they belong (which is great). However, IGES level names are not retained. For files with many IGES levels, this makes cross-referencing IGES levels with their corresponding Rhino Layers tedious and difficult.

A colleague of mine has discovered that LSPrePost imports the IGES levels from the IGES file by order of last modification of Rhino Layer. In other words, if Rhino “Layer 22” was the last layer to have an IGES entity modified, it becomes the 1st IGES level in LSPrePost (the 2nd last modified layer becomes the 2nd IGES layer, and so on…). For models with many layers (levels) this practically means that the order of input into LSPrePost is essentially random, adding considerably to the tedium of associating LSPrePost levels with Rhino layers.

Of course, LSPrePost wouldn’t know the order of modification of Rhino layers unless this was stored somehow in the IGES file. My question is: “Is it possible to force Rhino to write the IGES file levels in a particular order (e.g. alphabetical) regardless of the order of modification of the Rhino layers?”

Best regards,


Hi Bruce - the Rhino file itself stores objects by last-edited/created first. My guess is that the objects are simply processed and written to the iges file in this order. I think, as things are now, you’d have to order the objects according to the layer order somehow - i.e. modify an object (cut/paste or move/move back, maybe even just change color or something) to move it to the top of the heap. Probably scriptable - you could probably just replace objects with an identical copy or something. I’d fool with that ‘by hand’ to see if that is what works, and then maybe we can sort out a script.