|
CATIA V5 Programmierung : Noch ein Versuch -> CATProduct nach CATPart
kaeja am 20.07.2012 um 13:49 Uhr (0)
Auch wenn es die meisten nicht mehr für R16 interessiert, aber ich habe unter GenerateCATPartFromProduct eine super Lösung gefunden. Dabei wird auf externe Shell verzichtet:Code:Sub GenerateCATPartFromProduct()Dim ActDoc As ProductDocumentSet ActDoc = CATIA.ActiveDocumentDim MySel As SelectionSet MySel = CATIA.ActiveDocument.SelectionMySel.Add ActDoc.Product .Products.Item(1) CATIA.RefreshDisplay = TrueCATIA.StartCommand "Generate CATPart from Product..."CATIA.RefreshDisplay = True Dim PauseTime, Start ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Selektion bodies anhand von Baumposition
kaeja am 29.06.2012 um 09:18 Uhr (0)
Moin ThomasJay,vielen Dank für die schnelle Antwort. Bei mir läuft es leider nicht durch. Code:Sub CATMain() Dim productDocument1 As PartDocument Set productDocument1 = CATIA.ActiveDocument Dim selection1 As selection Set selection1 = productDocument1.selection Dim body1 As body Dim body5 As body Set body1 = selection1.item(1).value set body5 = selection1.item(5).value selection1.clear selection1.add body1 selection1.add body5 End SubAuch macht es mir den Anschein als würden hier nur zwei Körper selekti ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Problem mit SaveAs
kaeja am 23.07.2012 um 09:56 Uhr (0)
Beim testen meines Makros für das Speichern eines Produktes als Part habe ich auch das Problem mit der vorhandenen Datei in der Session.Wenn ich CATIA neu starte und das Makro starte, läuft es problemlos durch.Wenn ich aber die gleiche Stp-datei erneut einlese, steigt er hier aus:Code:Activdocu.SaveAs FullpartNameSobald ich alle offenen Fenster in CATIA schließe erhalte ich:Modifications on 123Name are still active because the 123Name is use in other windowsWie kann sicherstellen, dass alle Sessions in CAT ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Noch ein Versuch -> CATProduct nach CATPart
kaeja am 23.07.2012 um 17:39 Uhr (0)
Hast Du das unter R16 getestet?Bei funktioniert Code:Set oProd2Part = oBGProd.GetItem("DECProductToPart")oProd2Part.Rununter R16 nicht, weshalb ich den Weg über Code:CATIA.StartCommand "Generate CATPart from Product..." nehmen muss.
|
In das Form CATIA V5 Programmierung wechseln |