• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

interface catia with matlab

  • Thread starter Thread starter Alessio85
  • Start date Start date

Alessio85

Guest
Hello, everyone. .
is the first time I write on the forum... I hope to write in the right section....
I have a problem from which I can't come out....I have to interface matlab r2010a with catia v5r20 i.e. I have to manage all the processes of catia from matlab. I know that in matlab I can use the "actxserver" command to create a com server and then enter the caia commands...the problem is that matlab does not recognize catia as a server com... on the matlab screen this message appears to me:

c=actxserver('catia.application');
?? error using ==> actxserver at 91
server creation failed. invalid progid 'catia.application'

Does anyone know how I can do so that matlab recognizes catia? ?
 
Hello, everyone. .
is the first time I write on the forum... I hope to write in the right section....
I have a problem from which I can't come out....I have to interface matlab r2010a with catia v5r20 i.e. I have to manage all the processes of catia from matlab. I know that in matlab I can use the "actxserver" command to create a com server and then enter the caia commands...the problem is that matlab does not recognize catia as a server com... on the matlab screen this message appears to me:

c=actxserver('catia.application');
?? error using ==> actxserver at 91
server creation failed. invalid progid 'catia.application'

Does anyone know how I can do so that matlab recognizes catia? ?
perhaps the version of catia is too recent respect matlab r2010a.
try with the r2011b (the last exit) or, if you want to hold the r2010a, with a + old version of catia.
Hi.
 
If matlab interacts with catia in the same way that visual basic interacts with you I think you can do many but many interesting things... .
Does anyone have a practical example?? A miniguide? ? ?
 
If matlab interacts with catia in the same way that visual basic interacts with you I think you can do many but many interesting things... .
Does anyone have a practical example?? A miniguide? ? ?
I join and add. ..someone also has a catia+vb miniguide?
Thank you:
 
stef_design thanks to the advice, I am downloading the matlab 2011 and I will try to see if with that you recognize it... .
However I have already tried with the matlab 2007 and recognizes me catia v5r20 as a com server on the computer, but in that case it does not give me any properties usable with the matlab command

Catia.get

that should give me a list of all the properties of caia, i.e. any subcomands (for example to open a new part in caia etc.).

The problem is that then the project I'm doing will have to give it to my professor that I don't know what version of matlab or catia has....so I was looking for a way to make catia recognize as a server like any version of matlab.. .
I hope I've been clear enough... thank you anyway. . .
 
When I make a macro with vb works on all versions of catia (only recently with r21 has changed a little bit) and so I think if you use a version of matlab will open you any version of catia you have installed. I would see the problem between your version of matlab and that of the professor... I believe that even here it is worth the rule that a new version opens all the files generated with the old versions while it is not worth the opposite
 
counterrdine,
I managed to get catiab v5r20 recognized as a server com in matlab r2010a but now when I try to view the caia properties by using the command:

Catia.application.get

I get as an answer:
1x1 struct array with no fields.

the same thing he did with the 2007 matlab.
so once again I can't interact in any way (for example create a new part or display the cat window etc... )

Does anyone know how I can do to import catia properties into matlab?
 
Let's try to see if matlab thinks like vb....
If you write this catia command you should open a new part....
Tell me if it works.. .
Catia.documents.add(part)
 
I tried as you said with the command:

Catia.application.documents.add('part')

but it doesn't work, it tells me:

?? undefined variable "catia" or class "catia.documents.add".

must be a language similar to the basic but not that.
I have an example of matlab scripts where you call catia and work, which have passed me as working and commands are of this type:

catia.application.activedocument.activate;
catia.application.activedocument;
catia.application.activedocument.part;

So I think the point functions as a command to open the submenu, but I just don't recognize these properties. What if I create a com server with excel, in which with excel.apllication.get gives me a list of properties to use.

I think I have to add them somehow, I have seen that with microsoft visual basic 2008 to add an external program to call (e.g. excel) you do it through project--> add reference and then at the beginning list you use the import command
(I'm not very precise but I don't know the vb very well).

I think I have to do something like that in matlab... but I don't know how...
 
you understand what you mean.... they are external references.... in fact before using vb I have to open the references entry and tell him to use all the caia libraries.... those common office type(so excel word etc.) are usually recognized by the software automatically......
try to see if you find anything like that.... .
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top