|
CATIA V5 Programmierung : Unterschiedliche Product definitionen
bgrittmann am 19.02.2018 um 11:49 Uhr (1)
ServusWas ist bei dir die BauteilBenennung?Beispiel:Code:Set MyPartDocument = Catia.Documents.Item("MyPart.CATpart")Set MyPart = MyPartDocument.PartSet MyPartProduct = MyPartDocument.ProductArbeitest du in VBA? Dann nutze bitte mal das Watch/Local-Fenster um die Struktur zu erforschen.GrußBernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Running executable unter CATIA mit catscript
bgrittmann am 23.02.2018 um 15:05 Uhr (1)
ServusAlso in Windows 7 öffnet sich das Fenster mit deinem Code.(bleibt dann aber hängen: geht nur wenn Catia mit Englischer Sprache verwendet wird)GrußBerndPS: Das Makro von Joe von catia.cad.de kennst du auch?------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
 |
CATIA V5 Programmierung : FileSelectionBox 3dmap
bgrittmann am 23.02.2018 um 17:26 Uhr (15)
ServusWarum verwendest du denn die FileSelectionBox beim speichern und erneuten öffnen?Falls der User den Pfad/Dateinamen beim speichern wqählen soll könntest du diesen doch zwischenspeichern und erneut beim öffnen nutzen. zB (ungetestet)Code:Dim sPathAddDocument as StringsPathAddDocument = CATIA.FileSelectionBox(makroname + " " + version + " - Bauteil1", "*.3dmap", CatFileSelectionModeSave)document1.SaveAs sPathAddDocumentsFileList(0) = sPathAddDocumentPP.AddComponentsFromFiles sFileList, "All"Um den Date ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 26.03.2018 um 11:13 Uhr (1)
Hi SamWelcome to the forum.What do you wanna do in catia with a macro?Converting/Exporting file to .stp see for examlpe here.Regards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 26.03.2018 um 11:57 Uhr (1)
HiHave you tried to record the manual change of these parameters with the macro recorder?You could use this recorded code to develop your specialized code.Regards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 26.03.2018 um 13:25 Uhr (1)
HiA code example for two of these parameters:Code:Sub CATMain()Dim partDocument1 As DocumentSet partDocument1 = CATIA.ActiveDocumentDim part1 As PartSet part1 = partDocument1.PartDim parameters1 As ParametersSet parameters1 = part1.ParametersDim TotalLenghtPara As ParameterSet TotalLenghtPara = parameters1.RootParameterSet.DirectParameters.Item("Total_Lenght")TotalLenghtPara.Value = 300Dim AnglePara As ParameterSet AnglePara = parameters1.RootParameterSet.DirectParameters.Item("Angle")AnglePara.Value = -10 ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 26.03.2018 um 13:55 Uhr (1)
HiPlease try to understand the code and not only copy code snippets in one file.My code was written as .CATScript. (maybe you should also use CASTScript)Also have a look on the documentation (V5Automation.chm in the Catia install folder).Regards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 27.03.2018 um 16:44 Uhr (1)
Hi SamOpening Catia per command and execute a macro: see for example hereRegards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 29.03.2018 um 14:49 Uhr (1)
HiTry Code:CATIA.DisplayFileAlerts = FalseRegards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 31.03.2018 um 15:05 Uhr (1)
HiHave you tried the additional parameter -batch (also described in the previous posted link)? Have you specified the environment? (-direnv, -env)According to your other opened thread: IMHO would be the best option to using only your Python script to handle the tasks in Catia (using COM-Interface). But I have no idea how that works in Python.Regards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
bgrittmann am 31.03.2018 um 15:53 Uhr (1)
Hi,Please post the complete command lines you tried an the results.Maybe the is a mistake in them.Have you used the correct parameters for environment an so one?BerndPS: Please use unique file names for the attachments, otherwise the files will be overwritten and other user cannot follow the discussion (also in the future)------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Running CATScript with python
bgrittmann am 01.04.2018 um 14:58 Uhr (1)
HiHow do you want to execute the CATScript?If connecting to Catia works you could use the method ExecuteScript (see also V5Automation.chm)Regards,Bernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Produkte Vergleichen Außengeometrie
bgrittmann am 10.04.2018 um 17:39 Uhr (1)
ServusAlso die FileSelectionBox liefert dir nur einen Pfad und speichert/lädt direkt nicht.Es müsst ungefähr so aussehen (ungetestet)Code:strPathForCgr = CATIA.FileSelectionBox("Speichern von Wrapping Datei", "*.cgr", CatFileSelectionModeSave)wrapping1.SaveAs (strPathForCgr)GrußBernd------------------Warum einfach, wenn es auch kompliziert geht.
|
In das Form CATIA V5 Programmierung wechseln |