Type of active document
Type of active document
(OP)
Interested in the question: I have a form of VBA\vb.net\winforms. At startup, documents opened in the Catia are initialized there.
How can I check the type of the active open document?
And if it's not a part or a product, then display a message?
p.s. searching the forum did not answer my question
what i tried to do:
I want to prevent working with documents such as drawing, model, step, etc.
Need to check for parts and product
I also did not find information in the V5Automation.chm file
How can I check the type of the active open document?
And if it's not a part or a product, then display a message?
p.s. searching the forum did not answer my question
what i tried to do:
CODE --> vb.net
Private Sub Form1_Load(sender As Object, e As EventArgs) dim strDocType = TypeName(CATIA.ActiveDocument) if strDocType <> "ProductDocumemt" or strDocType <> "PartDocument" then MessageBox.Show("Active document must be product or part") System.Windows.Forms.Application.Exit() end if End sub
I want to prevent working with documents such as drawing, model, step, etc.
Need to check for parts and product
I also did not find information in the V5Automation.chm file
RE: Type of active document
CODE
RE: Type of active document