Adding the revision number to the step file name
Good morning,
please, I need to modify the rule that exports my parts to the stp file so that, in addition to the file name, which is identical to the .ipt name, it also writes the revision number in the name in this form: filename_0.stp
Thank you
Dim oPart As PartDocument oPart = ThisApplication.ActiveDocument ' a reference to the component definition. Dim oDef As PartComponentDefinition oDef = oPart.ComponentDefinition 'If Not (System.IO.Directory.Exists(System.IO.Path.Combine(ThisDoc.Path, "STEP"))) Then 'MessageBox.Show("NEJPRVE VYTVOŘTE ADRESÁŘOVOU STRUKUTURU") 'Return 'End If Dim sSavePath As String sSavePath = System.IO.Path.Combine(ThisDoc.Path, "step", ThisDoc.FileName(False) & ".stp") 'ulozeni stepu oPart.SaveAs(sSavePath, True)
Read more here: Source link
