| |
 | CATIA V5 Grundkurs | Einsteiger - 5 Std. 15 Min 48 |
| |
 | KISTERS 3DViewStation: Geniale 3D-Visualisierung für intuitiven HMI Einsatz, eine Pressemitteilung
|
Autor
|
Thema: Add text to drawing sheet/ CatiaV5 CD5 API (1016 / mal gelesen)
|
sina123 Mitglied

 Beiträge: 47 Registriert: 26.11.2018
|
erstellt am: 30. Mrz. 2020 09:55 <-- editieren / zitieren --> Unities abgeben:         
Hello, I am trying to add a text to drawing sheet through CatiaV5 CD5 integration API. I am able to open the drawing from server however I do not get the DrawingText class even after adding DRAFTINGITF library. When I trz to add create instance of the class i get error type or namespace could not be found and missing reference error if (cd5Engine.IsConnected()) { cd5Id = cd5Engine.GetIDFromTNRV("CATDrawing", "Mydrawing", "---", "1"); cd5Structure =cd5Engine.GetStructure(cd5Id); cd5Engine.get_RelatedDesigns(); cd5Engine.Open(cd5Id); DrawingText drawingText; Could anybody advise on this issue. Do I need any other library. The API documentation says to DrawingText to add text to drawing sheet but I am unable to get the reference. Thanks in advance.
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
sina123 Mitglied

 Beiträge: 47 Registriert: 26.11.2018
|
erstellt am: 30. Mrz. 2020 10:59 <-- editieren / zitieren --> Unities abgeben:         
|
bgrittmann Moderator Konstrukteur
       
 Beiträge: 12054 Registriert: 30.11.2006 CATIA V5R19
|
erstellt am: 30. Mrz. 2020 11:11 <-- editieren / zitieren --> Unities abgeben:          Nur für sina123
Hi I'm not familiar with CAA or C++. But on VB(A) add Drawingtexts is only possible in the Drawingtext-Collection. So i guess you have to get the sheet, then the Drawingview in it and then the Drawingtext-Collection. In VBA it looks like: Code: Set oDrawingDoc = CATIA.Documents.Open(sPath) Set oSheet = oDrawingDoc.ActiveSheet 'or .Sheets.Item(1) Set oView = oSheet.ActiveView 'or .Views.Item(1) Set oDrawingTexts = oView.Texts Set oText = oDrawingTexts.Add ("My Text", 0,0)
I guess it's similar in CAA. If it works on your older program: what is different? Regards, Bernd ------------------ Warum einfach, wenn es auch kompliziert geht. Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |
sina123 Mitglied

 Beiträge: 47 Registriert: 26.11.2018
|
erstellt am: 30. Mrz. 2020 11:21 <-- editieren / zitieren --> Unities abgeben:         
Hi, Thanks for the reply. I do not get the DrawingDocument reference. It shows error- type or namespace is missing. I have added the library DRAFTINGITF but it supports DrawingView, DrawingSheet etc but not DrawingDocument, DrawingText! I am trying to do the program in C#.net. Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP |