- Sep 10, 2001
- 12,348
- 1
- 81
update 2: Got it. Apparently I wasn't addressing the right property. Not sure how, but I figured it out. In case anyone cares:
sc.document.model.EllipseCurves.Add(parameters)
----------------------
update: Really need some help here. All I really need is to know how to create an object in MATLAB's COM interface.
----------------------
Despite years of scripting MATLAB, I'm apparently a complete newb when it comes to object-oriented programming. I understand the logic, but I can't seem to get the syntax right for creating objects/properties. I've tried reading a few online tutorials, but I think I'm dumber now than when I started.
Basically, I'm opening a finite element program (called StressCheck) as an ActiveX server from MATLAB. This seems to go off without a hitch. Then, I try to create the model geometry by creating various objects. This is where things pretty much come grinding to a halt. StressCheck has an object class called "EllipseCurve" which I need to use. I can create a property EllipseCurve, but I can't seem to assign it to a handle successfully. The code I'm trying is very brief:
sc = actxserver('StressCheck.application');
sc.addproperty('EllipseCurve');
which runs fine. However, if I instead have
sc = actxserver('StressCheck.application');
ec1=sc.addproperty('EllipseCurve');
then MATLAB says "One or more output arguments not assigned during call to 'COM.StressCheck_application'." I'm not really sure what to ask. I know that each object has to have a handle so that I can set its properties. If anyone can give me any help, I would really appreciate it. I've been spinning my wheels on this for quite some time now.
sc.document.model.EllipseCurves.Add(parameters)
----------------------
update: Really need some help here. All I really need is to know how to create an object in MATLAB's COM interface.
----------------------
Despite years of scripting MATLAB, I'm apparently a complete newb when it comes to object-oriented programming. I understand the logic, but I can't seem to get the syntax right for creating objects/properties. I've tried reading a few online tutorials, but I think I'm dumber now than when I started.
Basically, I'm opening a finite element program (called StressCheck) as an ActiveX server from MATLAB. This seems to go off without a hitch. Then, I try to create the model geometry by creating various objects. This is where things pretty much come grinding to a halt. StressCheck has an object class called "EllipseCurve" which I need to use. I can create a property EllipseCurve, but I can't seem to assign it to a handle successfully. The code I'm trying is very brief:
sc = actxserver('StressCheck.application');
sc.addproperty('EllipseCurve');
which runs fine. However, if I instead have
sc = actxserver('StressCheck.application');
ec1=sc.addproperty('EllipseCurve');
then MATLAB says "One or more output arguments not assigned during call to 'COM.StressCheck_application'." I'm not really sure what to ask. I know that each object has to have a handle so that I can set its properties. If anyone can give me any help, I would really appreciate it. I've been spinning my wheels on this for quite some time now.
