Copy and paste element size - copyxyz - Script



I want to share another one of my script snippet.

xmin = get('x min'); xmax = get('x max');
ymin = get('y min'); ymax = get('y max');
zmin = get('z min'); zmax = get('z max');

set('x min', xmin); set('x max', xmax);
set('y min', ymin); set('y max', ymax);
set('z min', zmin); set('z max', zmax);

Save as copyxyz and to run just type:

from = 'FDTD';
to = 'monitor';

It is possible to make a model script that when you change the FDTD domain, for example, it automatically change movie monitor, monitors, etc.

Idea came from Inkscape paste size.


I made a improved version Align.lsf (2.0 KB).

Usage is as follows:

from = 'FDTD';
to = 'monitor';
side = 'xmin ymax zcenter';

Others usage are:

side = 'xcenter xspan';


side = 'xcenter xspan ycenter yspan zcenter zspan';

Later I will make some shortcuts like center instead of the above, and the ability to align outside not just inside.