|
CATIA V5 Programmierung : Rootknoten aktivieren
Lambo5 am 19.02.2007 um 11:22 Uhr (0)
Hallo TomTom,ich durchsuche mit meinem Skript die Produkstruktur nach bestimmten Strings in der Partnumber. Die gefundenen Teile sollen im Anschluss aus der Produktstruktur entfernt werden. Um diese Teile später aber evt. wieder an der richtigen Stelle einzufügen, hinterlege ich im Adapterteil die Information in welcher Subbaugruppe sich das Einzelteil vor dem Löschen befand. Um diese Info in den Adapter zu übertragen, erstelle ich für jedes Product/Part auf Assemblyebene einen Parameter in dem drinsteht, ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Rootknoten aktivieren
Goosnargh am 27.02.2007 um 14:00 Uhr (0)
Ich hab mir mal ne Lösung gebastelt, aber auch nicht gerade stabil:Sub NeuesProdukt()Dim ToBeClosed As StringCATIA.ActiveDocument.Selection.Add CATIA.ActiveDocument.ProductCATIA.ActiveDocument.Selection.CopyCATIA.ActiveDocument.Selection.ClearDim documents1 As DocumentsSet documents1 = CATIA.DocumentsDim productDocument1 As ProductDocumentSet productDocument1 = documents1.Add("Product")CATIA.ActiveDocument.Selection.Add CATIA.ActiveDocument.ProductToBeClosed = CATIA.ActiveDocument.Product.PartNumberCATIA.A ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Makro aufrufen
Falk H am 27.02.2007 um 17:16 Uhr (0)
Hallo!Zurzeit schreibe ich in CATIA-VBA an einem komplexen Makro. Aus diesem Grund möchte ich das Programm auf mehrere Makros verteilen. Leider weiß ich nicht, wie ich nicht, wie ich ein anderes Makro (keine *.exe) aus einem Makro aufrufen kann. Ich habe schon überlegt, die Makros jeweils in VB zu kopieren und in *.exe zu kompilieren. Diese müssten dann eigentlich so (Beispiel)CATIA.SystemService.ExecuteProcessus ("C:ProgrammeMicrosoft OfficeOfficeWINWORD.exe")aufzurufen sein.CATIA gibt mir aber die Fehler ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Makro aufrufen
CAMiCADse am 27.02.2007 um 17:54 Uhr (0)
Hallo Falk,das liegt an dem Leerzeichen im Pfad.Wenn du den Pfad in Hochkommata einschließt, sollte es klappenCode:CATIA.SystemService.ExecuteProcessus ("C:ProgrammeMicrosoft OfficeOfficeWINWORD.exe")GrußCAMiCADse
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Makro aufrufen
Falk H am 27.02.2007 um 19:33 Uhr (0)
Hallo nochmal!Habe die Lösung:Sub CATMain()Dim wert As DoubleDim SServiceSet SService = CATIA.SystemService unbedingt so machen!!!Dim params(2)params(0) = 1params(1) = 2params(2) = 3wert = SService.ExecuteScript("C:EigeneBibliothek.catvba", catScriptLibraryTypeVBAProject, "EigenesModul", "EigeneFunktion", params)End SubEs ist wichtig, dass man nicht dies eingibt:wert = CATIA.SystemService.ExecuteScript...GrußFalk
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Makro aufrufen
Falk H am 27.02.2007 um 18:12 Uhr (0)
Danke sehr!Mit Deinem Vorschlag funktioniert es!Aber ich habe noch ein Problem festgestellt. Kann es sein, dass der Befehl: CATIA.SystemService.ExcetuteScript(Pfad)in VBA nicht anwendbar ist?Danke nochmals!GrußFalk
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Text insert
toyo83 am 01.03.2007 um 10:28 Uhr (0)
Hello i want to insert a text in a drawing im using this Code:Sub CATMain()Dim drawingDocument1 As DrawingDocumentSet drawingDocument1 = CATIA.ActiveDocumentDim drawingSheets1 As DrawingSheetsSet drawingSheets1 = drawingDocument1.SheetsDim drawingSheet1 As DrawingSheetSet drawingSheet1 = drawingSheets1.ActiveSheet Dim MyView As DrawingView Set MyView = MySheet.Views.ActiveView Dim MyText As DrawingText Set MyText = MyView.Texts.Add("ComplexText", 0#, 0#)End Subbut id dosent work, the vb editor says that i ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Text insert
toyo83 am 01.03.2007 um 12:33 Uhr (0)
hy it works but i have other problem i want to loop thru all texts and if a name of te text field match i want to put there some data from my textbox on a userform. could somone help?? this is the code of the subCode:Sub txt(ByVal desk As String, ByVal id As String, ByVal mat As String, ByVal dat As String, ByVal nam As String, ByVal prod As String)Dim DrwDocument As DrawingDocumentSet DrwDocument = CATIA.ActiveDocumentDim DrwSheets As DrawingSheetsSet DrwSheets = DrwDocument.SheetsDim DrwSheet As DrawingS ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Text insert
Proofin am 01.03.2007 um 13:27 Uhr (0)
Sorry for my bad english!I am not sure wheter i have understood you right.But here my version of this function:---------------------------------------------------------- Code Begin----------------------------------------------------------Sub txt(ByVal desk As String, ByVal id As String, ByVal mat As String, ByVal dat As String, ByVal nam As String, ByVal prod As String)Dim DrwDocument As DrawingDocumentSet DrwDocument = CATIA.ActiveDocumentDim DrwSheets As DrawingSheetsSet DrwSheets = DrwDocument.SheetsDim ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Farbe Ändern
windrebel am 02.03.2007 um 09:00 Uhr (0)
Hallo Lusilnie,das hat schon mal geholfen, das eine farbliche Änderung für die Selection in "graphic properties" vorgenommen wird, aber das Problem ist die tatsächlich die Selection!Ich bekomme zwar das richtige Dokument in meinem Überwachungsfenster als Selection angezeigt, aber selektiert ist in CATIA trotzdem garnichts! Selktiere ich manuell funktioniert die Einfärbung problemlos!Was muß ich an meiner Selection ändern??? Grußwindrebel
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Aufruf des Properties-Fensters aus Macro heraus
V5-Maxe am 05.03.2007 um 13:35 Uhr (0)
Hallo,weiss jemand, ob (und wenn ja - WIE?) das Eigenschaften-Fenster(Properties) für ein Element per Macro aufgerufen werden kann.Wie z.B. der Dialog zum "Datei öffnen" - Datei=CATIA.FileSelectionBox("Datei öffnen", "*.CATPart", CatFileSelectionModeOpen)nur eben das ich dann das Properties-Fenster für ein bestimmtes Element angezeigt bekomme?Gruß V5-Maxe
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Aufruf des Properties-Fensters aus Macro heraus
CAMiCADse am 05.03.2007 um 19:53 Uhr (0)
Hallo V5-Maxe,einzige Möglichkeit, die ich da sehe:Element mit Selection.add markieren und dann mit Sendkeys (Alt+Enter) die Properties aufrufen.Evtl. geht auch was mit "CATIA.StartCommand", kann ich aber gerade nicht prüfen.GrußCAMiCADse
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Drucker ansteuern
bewnc am 07.03.2007 um 12:43 Uhr (0)
Hallo Ole,ich arbeite mit VBA. Hier ein Auszug aus meinem Makro.Sub CATMain()On Error GoTo fehlerDim DrwDocument As DrawingDocumentSet DrwDocument = CATIA.ActiveDocumentDim DrwSheets As DrawingSheetsSet DrwSheets = DrwDocument.SheetsDim DrwSheet As drawingsheetSet DrwSheet = DrwSheets.ActiveSheetSet pageSetup1 = DrwSheet.PageSetuppageSetup1.Orientation = catPaperPortraitpageSetup1.LeftMargin = 3.5pageSetup1.RightMargin = -3.5pageSetup1.TopMargin = 0pageSetup1.BottomMargin = 0pageSetup1.MaximumSize = Truepa ...
|
In das Form CATIA V5 Programmierung wechseln |