|
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 |
|
CATIA V5 Programmierung : part and drawing open with a macro
toyo83 am 07.03.2007 um 16:10 Uhr (0)
hy i want to open automaticly a drawing and a part with a macro with the start of a userform my code lokks like that:Code:Dim doc, doc1 As DocumentsSet doc1 = CATIA.DocumentsSet doc = CATIA.DocumentsDim path, path1 As Stringdoc = CATIA.Documents.Open("Z:dataINTERNESzk_zeichnungencarrier.CATPart")doc1 = CATIA.Documents.Open("Z:dataINTERNESzk_zeichnungenCarrier.CATDrawing")formatka.showbut it opens only the catpart and gives me an error: "tht object doesnt support this..." and that error is to that code : "f ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : CAAUseCase mit Visual Studio ausführen
listing_code am 07.03.2007 um 17:11 Uhr (0)
Hi Beautyhabe ich das richtig verstanden:Möchtest Du CAAUseCase im Visualbasic Editor von VisualStudio in Catia ausführen?GrüßeL_C
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Messung erstellen
listing_code am 07.03.2007 um 14:56 Uhr (0)
Grüßt Euch!Ich stehe gerade voll aufm Schlauch:Ich kann mit folgendem Code eine Messung durchführen:....... Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench("SPAWorkbench") Set TheMeasurable = TheSPAWorkbench.GetMeasurable(RefPoint2) Dim Coordinates1(2) TheMeasurable.GetCOG Coordinates1 MsgBox ", Center of gravity : X = " & _ CStr(Coordinates1(0)) & ", Y = " + CStr(Coordinates1(1)) & ", Z = " + CStr(Coordinates1(2)).....Wie kann ich aber das Ergebis im Baum einfügen, sowas ähnliches wie im ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Automatisches Aufrufen eines Makros im Batch-Modus
tomtom1972 am 13.03.2007 um 07:15 Uhr (0)
Hallo,zu 2.du kannst im Script abfragen, welche Lizenz(en) CATIA gezogen hat. Wenn jene die du benötigst nicht dabei ist, liegt ein Lizenzfehler vor. Ein Problem hast du nur, wenn du auch keine Grundlizenz hast (MD2 oder HD2 oder was vergleichbares). Dann läuft das Script erst gar nicht.zu 3.Das dauert ja in deinen Fall ewig lange, wenn du mit jedem Modell CATIA neu startest. Besser wäre: am Anfang einmal CATIA aufrufen, und dann nur noch nacheinander die Modelle.GrussTomTom ------------------tomtom1972
|
In das Form CATIA V5 Programmierung wechseln |