Embedding smart components into glyphs by script doesn't work properly

Hi. Glyphs team,

I’m trying to make smart components programmatically then put them into new glyphs as GSComponent.

But the problem is that if I make smart components the put them into new glyph, the glyph size is shown as ‘auto( )’ like the picture. And the components are not possible to move to other position.

However, if I make the smart components, save and reopen Glyphs app, it works properly like below.

I hope to figure out the solution.

just a guess, not sure if it’s the actual issue. Did you try to turn off the automatic alignment for the components in the script, as well?
Of course, that should be only done if you want it to be disabled in the first place, though.

As Mark said, you need to disable the automatic alignment for the components.

Thanks! It works properly.