Change a detector position on Z-axis using SETNSCPOSITION

  • 18 January 2023
  • 1 reply

Suppose I have a source (surface 1) and a detector (surface 2) in NSC mode. I’m trying to make a macro that shifts the detector along Z-axis using the command SETNSCPOSITION but it doesn't seems to work.

The syntax is 

SETNSCPOSITION surface, object, code, value

Can someone please explains each keyword and how to use it?

   The surface is the detector surface - 2 ?

   What is the object?

   code = 3 for Z

   Value is the new position?\





Best answer by David.Nguyen 18 January 2023, 17:55

View original

1 reply

Userlevel 6
Badge +2

Hi AsafPe,


The surface parameter only applies to mixed mode system where you have a Non-Sequential Component Surface in your Sequential file. If you are using the Non-Sequential mode, meaning that in the Setup tab, the highlighted Mode is Non-Sequential. Then, it should be kept to 1.

Object is the actual object number in the Non-Sequential Component Editor. In pure Non-Sequential mode, we don’t have surfaces, instead we have object number. In my screenshot below, the Detector Rectangle is Object 2.

The rest is correct, Code = 3 is the Z Position, and Value is the new Z Position value.

I hope this helps, and take care,