Copy and paste element size - copyxyz - Script

script

#1

I want to share another one of my script snippet.

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

select(to);
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';
copyxyz;

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.


#2

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';

or

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.