elmundo777
Automotive
Hello everyone. Interested in creating a Part of the document and changing its name (c #, WinFrorms project, the name is taken from the textbox).
If you write a macro in CATIA, then the code looks like this:
Sub CATMain ()
If you use it in C #, it doesn't see PartNumber method:
product1.PartNumber = "agggegeggegweeh"
C # code:
If you write a macro in CATIA, then the code looks like this:
Sub CATMain ()
Code:
Dim documents1 As Documents
Set documents1 = CATIA.Documents
Dim partDocument1 As Document
Set partDocument1 = documents1.Add ("Part")
Dim product1 As CATBaseDispatch
Set product1 = partDocument1.GetItem ("Part1")
product1.PartNumber = "agggegeggegweeh"
End Sub
If you use it in C #, it doesn't see PartNumber method:
product1.PartNumber = "agggegeggegweeh"
C # code:
Code:
var documents1 = CATIA.Documents;
var partDocument1 = documents1.Add ("Part");
var product1 = partDocument1.GetItem ("Part1");
product1.[b]PartNumber[/b] = "agggegeggegweeh";