Why do I get the error "Server Creation Failed: "Class not Registered" ?

조회 수: 23 (최근 30일)
Nishtha Shrivastava
Nishtha Shrivastava 2022년 5월 26일
답변: Shuba Nandini 2023년 10월 5일
I am creating a COM server (using actxserver) for CSTStudio using MATLAB, but i m getting an error related to Class not regiestred in feval which is working inside actxserver. Also when i tried to create COM server for other applications such as Word and Powerpoint it is working fine but showing error for invoke function.
Here is the Code:----
addpath(genpath('G:\MATLAB\CST-MATLAB-API-master'));
cst = actxserver('CSTStudio.application');
mws = cst.invoke('NewMWS');
This is the error:---
>> MicrostripAntenna
Error using feval
Server Creation Failed: Class not registered
Error in actxserver (line 89)
h=feval(['COM.' convertedProgID], 'server', machinename, interface);
Error in MicrostripAntenna (line 32)
cst = actxserver('CSTStudio.application');
  댓글 수: 1
Begginer201
Begginer201 2022년 12월 28일
Try to use cst = actxserver('CSTStudio.application.2021'); if you have the 2021 version installed

댓글을 달려면 로그인하십시오.

답변 (1개)

Shuba Nandini
Shuba Nandini 2023년 10월 5일
Hello,
I understand you are encountering an error when trying to create a COM server for CSTStudio using “actxserver” function. Here are some troubleshooting steps you can follow to resolve this issue:
  • Ensure that the bitness (32-bit or 64-bit) of MATLAB matches the bitness of the CST Studio installation. If the bitness between MATLAB and CSTStudio is different, please get a version of MATLAB or CSTStudio that matches the bitness of the other.
  • Make sure that CSTStudio is correctly installed on your computer. If it’s correctly installed, try using the version number of the CSTStudio you have installed in “actxserver” function.
cst = actxserver('CSTStudio.application.<version number>');
I hope this helps you to resolve the issue!
Regards,
Shuba Nandini

카테고리

Help CenterFile Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by