Hello,
I try writing a macro (and also a vb.net project)to extract electrical objects information from a Catia assembly (wires: number, length...)using the ElectricalTypeLib library.
But I can't access to any ElectricalObject.
Any help please ?
Thanks.
Hello MahPLM,
Just to be sure: you're writing this macro inside CATIA or outside on Visual Studio or VBA?
selection1.Search("ElectricalObject")
Are you sure "ElectricalObject" is the real name given by Dassault?
Moreover, I think you should add ,all to be sure you select everything
selection1.Search("ElectricalObject, all")
Here is a little macro to test the type of the selected object:
Code:
Sub CATMain()
Msgbox Typename(CATIA.Activedocument.Selection.Item2(1).Value)
End Sub