I'm using the python interface to ZOS API.
I am trying to set the power on a source in the NSE. I can't seem to set this attribute. I am able to set the position, angle, source charateristics etc.
any ideas?
Code: (at least enough to illustrate what I'm doing...)
NSCE = TheSystem.NCE S = NSCE.InsertNewObjectAt(1) S.ChangeType(S.GetObjectTypeSettings(constants.ObjectType_SourceDiode)) # This works fine. S.XPosition = DiodeFaceAtRadius ObjectSrc = CastTo(S.ObjectData, 'IObjectSources') # Neither one of these stements does anything. ObjectSrc.Power = 1.0 ObjectSrc.NumberOfLayoutRays = 100 # This works fine. ADiodeSrc = CastTo(S.ObjectData, 'IObjectSourceDiode') ADiodeSrc = CastTo(S.ObjectData, 'IObjectSourceDiode') ADiodeSrc.DeltaX = 0.18