|
CATIA V5 Programmierung : LS-OPT and CATIA
Sam2021 am 29.03.2018 um 15:37 Uhr (1)
Dear Bernd, It works perfectly fine. Thank you. Just one more doubt. If i want to use python to execute the script, is it possioble? i looked up online and there was some sugeestions. I tried but i get this error. So i checked this error, they say the python version was 64. i checked it is 32. yet the error reappears. COuld you please help me fix this if its possible?Thank you best regards, Sam
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
Sam2021 am 31.03.2018 um 14:44 Uhr (1)
Dear Bernd, About the .CATscript, it only works when i go to command line "CNEXT.exe directory" -macro"scriptdirectory". so if i double click the macros script file while CATIA interface is closed, the CATIA userinterface opens up and just blank (i.e. it wont run the model"). Should i include any command to the macro script wherein it says run it in batchmode? Thank you very much and looking forward to hear from you.
|
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 : LS-OPT and CATIA
Sam2021 am 31.03.2018 um 16:21 Uhr (1)
Dear Bernd, 1. Command line ["C:FK-ProgrammeDassault SystemesB24win_b64codeinCNEXT.exe" -batch -macro "E:DateiResultsOptimizationLS_OPT_resultsOptimization_model_1Macro_schweller_model_lsopt.CATScript"[ == result == a new stp file was created and saved in the directory but the CATIA interface was not opened (everything happened in the background". 2. ["C:FK-ProgrammeDassault SystemesB24win_b64codeinCNEXT.exe" -env CATIA.V5-R2014.B24 -batch -macro "E:DateiResultsOptimizationLS_OPT_resultsOptimization_mode ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : LS-OPT and CATIA
Sam2021 am 31.03.2018 um 19:47 Uhr (1)
Dear Bernd, Am i supposed to include anything such as "execute" in the beginning of .CATScript file in order for the CATIA application to start automatically when the .CATSCript is executed? Thank you very much.
|
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 : oSel.add Reference method add failed
eisalex am 03.04.2018 um 21:07 Uhr (5)
Servus zusammen,Anfänger Problem:ich habe mehrere Themen durchgeschaut, wo das Problem aufgetaucht ist. Überall gibt es Lösungen im "Code" die ein Workaround darstellen. Ich hätte gerne methodisch generalisierten Umgang mit ADDEN von References zu der Selektion.Bei mir ist es so, dass ich im Catpart arbeite und bis jetzt habe ich immer geschafft der Selektion ein Objekt zu füttern.Jetzt bin ich aber soweit, dass ich nur die Referenz übergeben kann. Meine Selektion ist folgend definiert: Set oSel= CATIA.Ac ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Produkte Vergleichen Außengeometrie
Splex54 am 04.04.2018 um 11:14 Uhr (1)
Danke Bernd, war eine super Idee!Ich habe nun versucht auch die Wrapping Funktion zu automatisieren. Habe mir die wichtigsten Code Zeilen aus dem Makrorecorder geholt.Allerdings funktioniert der Code nicht mehr, wenn ich ihn umschreibe, so dass er mit beliebigen Geometrien arbeiten kann und nicht nur mit einer wie beim Makrorecorder.Code:Sub CATMain()Dim productDocument1 As DocumentSet productDocument1 = CATIA.ActiveDocumentDim product1 As ProductSet product1 = productDocument1.ProductDim groups1 As CATBas ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Type Objekt in Bearbeitung auslesen
C.Samer am 06.04.2018 um 12:24 Uhr (1)
Hallo,vlt ist es dieser Code hier?Code:xxx = Catia.ActiveDocument.Part.InWorkObjectLiebe Grüße aus Wien,Christoph[Diese Nachricht wurde von C.Samer am 06. Apr. 2018 editiert.]
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Automatisch groß Buchstaben
moppesle am 06.04.2018 um 14:59 Uhr (1)
Hallo Sylas,schau mal hier.------------------Gruß UweAuch Catia ist nur ein Mensch!
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Einen Parameter über eine userform ändern
MrFlaip am 06.04.2018 um 15:48 Uhr (1)
Hallo zusammen,ich bin ganz frisch in der Makroprogrammierung und habe folgendes Problem:Ich möchte mithilfe einer Eingabe in einer Userform den Wert eines Parameters ändern. Das ParameterSet in welchem sich der zu ändernde Parameter befindet, ist jedoch in einem weiteren ParameterSet (siehe Bild). Ich finde allerdings nicht den korrekten Objektpfad um den Parameter anzusprechen. Hier mein Code:Private Sub Button_Take_Click()Dim documents1 As DocumentsSet documents1 = CATIA.DocumentsDim partDocument1 As Pa ...
|
In das Form CATIA V5 Programmierung wechseln |
|
CATIA V5 Programmierung : Einen Parameter über eine userform ändern
89marbru am 09.04.2018 um 21:13 Uhr (1)
Hi,ich konnte wie folgt auf den Parameter in den Parameters zugreifen:Dim my_parameters as ParametersSet my_parameters = CATIA.ActiveDocument.Part.ParametersDim length1 as LengthSet length1 = my_parameters.Item("Part_Uebung4Parameters.2X_Punkt2")length1.Value = 100Mein Beispiel war etwas anders aber es sollte so klappen. Ich schaue mir im Visual Basic Editor von Catia immer das Watch-Window an und dort kann man die Struktur einfach nachgehen. Wenn man das so in Catia macht klappt es meistens. Und die Funkt ...
|
In das Form CATIA V5 Programmierung wechseln |