|
CATIA V5 Programmierung : Oberste Ebenen Strukturbaum
michi79 am 19.03.2009 um 14:55 Uhr (0)
Hallo, ich hab mir im Makrorecorder ein einfaches Makro aufgenommen. Es sind 2 Parts geöffnet aus Part2 möchte ich einen Körper mit Copy/Paste (As specified in Partdocument einfügen). Catia bricht jedoch mit einer Fehlermeldung ab, weil das Makro in den Hauptkörper in Part1 einfügen will. Wie mache ich per Macro die Root-Ebene von Part1 aktiv GrussMichi
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
merlin74 am 18.03.2009 um 15:37 Uhr (0)
Hallo Miteinander, folgendes Script soll nur eine Datei öffnen und "Fit all in" ausführen. Macht es aber leider nicht (Fit all in). Wenn ich das Script ein zweites mal aufrufe wenn die Datei bereits geöffnet ist, dann funktioniert es. Language="VBSCRIPT"Sub CATMain()Dim documents1 As DocumentsSet documents1 = CATIA.DocumentsDim partDocument1 As DocumentDim strfile As Stringstrfile = CATIA.FileSelectionBox("Select a file", "*.CATPart", CatFileSelectionModeOpen)Set partDocument1 = documents1.Open(strfile)Dim ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : SN suchen
Tweety79 am 19.03.2009 um 14:01 Uhr (0)
Hi!Hier eine Frage, die eher nur mit Programmierung generell als mit CATIA zu tun hat, aber vielleich weiß es jemand:Gibts irgendwo ein Programm, mit dem ich in einem Ordner auf Laufwerk X, in allen Excel-Dateien nach einer SN (Sachnummer), z.B. *7561223* suchen kann?Danke.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
K.Siebert am 18.03.2009 um 16:25 Uhr (0)
HalloSchon mal so probiert ?Code:sInputFile = CATIA.FileSelectionBox("Part auswaehlen und ab gehts!", "*.CATPart", CatFileSelectionModeOpen) Set oDoc = CATIA.Documents.Open(sInputFile)------------------ Sei Schlau bleib Dumm !!?!!
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
K.Siebert am 18.03.2009 um 16:55 Uhr (0)
Ja fast bis auf CATIASet oDoc = CATIA.Documents.Open(sInputFile)------------------ Sei Schlau bleib Dumm !!?!!
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
merlin74 am 18.03.2009 um 16:58 Uhr (0)
ok, bei mir steht das halt in zwei Zeilen: Set documents1 = CATIA.DocumentsSet partDocument1 = documents1.Open(strfile)Ändert aber leider nichts am Ablauf.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
K.Siebert am 18.03.2009 um 17:35 Uhr (0)
Code:Set specsAndGeomWindow1 = CATIA.ActiveWindowIn meinen Skripten steht das immer So z.B.Code:Set specsAndGeomWindow1 = CATIA.ActiveDocumentUnd zu deiner zweiten frageAchtung ist nur aus einen Skript rauskopiert kannst ja die Passenden Code Zeilen rausnehmeDiese Skript gleicht den Speichernamen und die Partnumber ab und Passt die Partnumber an den Speichernamen anCode:Sub DATEI_gleich_PARTNIf Err Then msgbox "Es ist ein Fehler Aufgetreten"Exit Subend if Dim Eingabe As String sInputFile = CATIA.FileSelec ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
ogard1 am 18.03.2009 um 18:59 Uhr (0)
Hallo,so musste es funktionieren.GrußSub CATMain()Dim documents1 As DocumentsSet documents1 = CATIA.DocumentsDim partDocument1 As DocumentDim strfile As Stringstrfile = CATIA.FileSelectionBox("Select a file", "*.CATPart", CatFileSelectionModeOpen)Set partDocument1 = documents1.Open(strfile)Dim specsAndGeomWindow1 As WindowSet specsAndGeomWindow1 = CATIA.ActiveWindowDim viewer3D1 As ViewerSet viewer3D1 = specsAndGeomWindow1.ActiveViewerviewer3D1.Activate()CATIA.ActiveWindow.ActiveViewer.ReframeEnd Sub
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
merlin74 am 19.03.2009 um 08:31 Uhr (0)
Hallo Andy, das mit dem VBA wäre kein Problem. Werde ich mir mal anschauen. @all:Reframe für nun so funktionieren:Language="VBSCRIPT"Sub CATMain()Dim partDocument1 As DocumentDim strfile As Stringstrfile = CATIA.FileSelectionBox("Select a file", "*.CATP*", CatFileSelectionModeOpen)Set partDocument1 = CATIA.Documents.Open(strfile)Dim specsAndGeomWindow1 As WindowSet specsAndGeomWindow1 = CATIA.ActiveWindowDim viewer3D1 As ViewerSet viewer3D1 = specsAndGeomWindow1.ActiveViewerCATIA.StartCommand("Multi-View") ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
merlin74 am 19.03.2009 um 13:22 Uhr (0)
Hallo Andy, sorry das ich so dumm frage, aber ich weis es wirklich nicht besser. Gibt es nicht eine Möglichkeit den "Datei öffnen" Dialog wie im Catia aufzurufen. Dort hab ich ja auch die Möglichkeit von Multiselekt. GrüßeMerlin
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
AndyMF am 19.03.2009 um 14:09 Uhr (0)
Hallo Merlin,das geht ,aber wie gesagt nur mit dem Common Dialog modul in VBA.Schau dir mal das Common Filedialog system an.Ansonsten musst du es dir mit einem dialog und ner listview selber bauen.Was den Vorteil hat das es auf allen Catia Kisten mit VBA läuft ohne das Modul zusätzlich zu laden.Gruß Andy
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : User-Selektion umbennen
meisterlumpi am 19.08.2011 um 20:42 Uhr (0)
Hier ist noch eine andere Funktion, die prüft ob Komponente oder nicht. Die hab ich jetzt auch in meinen code eingebaut, sprich falls die bei dir funktioniert kannste die VBA-PartProductRename.catvba nochmal runterladen und ausprobieren - http://nj.riotdowntown.com/downloads/?did=3 ansonsten weiß ich ehrlich gesagt auch nicht mehr weiter, überall wo ich das makro ausprobiert hab bzw. ausprobieren hab lassen, hat es funktioniert. Welche Catia Version und Servicepack benutzt du eigentlich?Code:Sub CATMain() ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Anfängerfrage Reframe / FileSelectionBox
merlin74 am 19.03.2009 um 16:02 Uhr (0)
Ich hab was ganz einfaches gefunden, wie ich an den Öffnen-Dialog von Catia komme: CATIA.StartCommand "Öffnen"Leider funktioniert dann das Reframe bei der ersten ausgewählten Datei wieder nicht mehr. Ich bin soweit, ich gebs auf. Danke an alle für die Hilfe. GrüßeMerlin
|
In das Form CATIA V5 Programmierung wechseln |