[bug #68337] [octave-forge] (windows) COM invoke method fails on some objects from ZOS-API

Andreas Weber <[email protected]> Mon, 11 May 2026 02:44:41 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

URL:
  <https://savannah.gnu.org/bugs/?68337>

                 Summary: [octave-forge] (windows) COM invoke method fails on
some objects from ZOS-API
                   Group: GNU Octave
               Submitter: andy1978
               Submitted: Mo 11 Mai 2026 06:44:36 UTC
                Category: Octave Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Unlocked
                 Release: 10.2.0
        Operating System: Microsoft Windows
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mo 11 Mai 2026 06:44:36 UTC    By: Andreas Weber <andy1978>
GNU Octave Version: 10.2.0
Microsoft Windows 11 Pro, Version 10.0.26200 Build 26200
octave-forge windows 1.6.5

I'm trying to access some Zemax objects via ZOS-API. This works in most cases
but some methods fail:


pkg load windows
con = actxserver("ZOSAPI.ZOSAPI_Connection");
app = con.ConnectAsExtension(0);
sys = app.PrimarySystem;
nce = sys.NCE;
NSCRayTrace = sys.Tools.OpenNSCRayTrace()
NSCRayTrace.ClearDetectors(0);

# This fails
NSCRayTrace.RunAndWaitForCompletion()

# with error
# error: com_invoke: unknown property/method name `RunAndWaitForCompletion'
#error: called from
#    foo at line 10 column 1

# for debugging, this is shown for NSCRayTrace
NSCRayTrace =
<COM object NSCRayTraceTool (0x0x1543e63fdb0)>


I've tried to debug this and my first guess is that's some sort of inheritance
problem but I'm not familiar enough with this COM stuff/object model.

Any idea here? Perhaps a standalone C++ application using octave_com_object
directly would help.

calling method gives:

>> methods(NSCRayTrace)
Methods for class octave_com_object:
AddRef               GetIDsOfNames        Invoke
SetPartialRTMode     invoke
ClearDetectorObject  GetTotalRayEnergy    QueryInterface       SetRandomSeed
     methods
ClearDetectors       GetTypeInfo          Release              delete
     release
EstimateHPCTime      GetTypeInfoCount     ResetRandomSeed      get
     set


As you can see, RunAndWaitForCompletion isn't listed here.

Again, I think there is some inheritance problem between INSCRayTrace and
ISystemTool.














    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68337>

_______________________________________________
Nachricht gesendet über Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCagF62QAKCRCqLAuaBUf3
TsQyAP9BUbXKqrO9hJyJT1R5l4Ngxhupr/ZbHlqats5YLau/hgEA3GpK600OruCf
ROePgAN3R15cgc6TwaEb7eVLgaP1XQo=
=orTo
-----END PGP SIGNATURE-----