Hi all;
I recorded a macro within Catia and would like to run this macro in batch mode aiming to update the required parameters dynamically..
I need help at this point beacuse when i update my macro and using
"C:\Program Files\Dassault Systemes\B20\win_b64\code\bin\CNEXT.exe" -nowindow -macro -batch ...\MyMacro.catvbs
it doesnt update my model??
can anyone help?
Language="VBSCRIPT"
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set parameters1 = part1.Parameters
Set length1 = parameters1.Item("Height")
length1.Value = 200.000000
part1.Update
Set parameters2 = part1.Parameters
Set length2 = parameters2.Item("Width")
length2.Value = 100.000000
part1.Update
Set partDocument1 = CATIA.ActiveDocument
partDocument1.Save
End Sub
I recorded a macro within Catia and would like to run this macro in batch mode aiming to update the required parameters dynamically..
I need help at this point beacuse when i update my macro and using
"C:\Program Files\Dassault Systemes\B20\win_b64\code\bin\CNEXT.exe" -nowindow -macro -batch ...\MyMacro.catvbs
it doesnt update my model??
can anyone help?
Language="VBSCRIPT"
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set parameters1 = part1.Parameters
Set length1 = parameters1.Item("Height")
length1.Value = 200.000000
part1.Update
Set parameters2 = part1.Parameters
Set length2 = parameters2.Item("Width")
length2.Value = 100.000000
part1.Update
Set partDocument1 = CATIA.ActiveDocument
partDocument1.Save
End Sub