Skip to main content
Question

Thickness, comment. etc. cell values not accessible pythonnet3

  • January 22, 2024
  • 1 reply
  • 39 views

I have upgraded to pythonnet 3 and I cannot find any way to access the values of the cells. I seem to be able to set the focus but I cannot read the value out.

focus = 5

foc_adj = TheSystem.LDE.GetSurfaceAt(5) 
foc_adj.Thickness = focus  
 

 

Cell In[141], line 1----> 1 foc_adj.ThicknessNullReferenceException: Object reference not set to an instance of an object.Server stack trace:    at ZemaxUI.ZOSAPI.Editors.ZOSAPI_LDETools.GetCellValue(Int32 rowIndex, Int32 col)   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)Exception rethrown at [0]:    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)   at ZemaxUI.ZOSAPI.Editors.IZOSAPI_LDETools.GetCellValue(Int32 rowIndex, Int32 col)   at ZemaxUI.ZOSAPI.Editors.ZOSAPI_EditorCellBase.get_DoubleValue()

1 reply

  • Author
  • Monochrome
  • 3 replies
  • January 22, 2024

Sorry all. Please ignore. I was trying to read a none existent file.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings