hexagon logo

Automate export?

Seeking a way to automate the export process, specifically to IGES.

Ideal would be code that happens at finish of program run.

Next best thing would be a button to click.

Any ideas as to where to start?

Thanks in advance!

- Josh
Parents
  • Thanks Jonny

    Here's the completed working BAS:

    Sub main(AutomaticIGESout)
    
    Dim App As Object
    Set App = CreateObject("PCDLRN.Application")
    
    Dim Part As Object
    Set Part = App.ActivePartProgram
    
    Dim strProgID As String
    strProgID = Part.FullName
    
    Dim strNewName As String
    Dim findDotPosition
    
    Part.Save
    
    findDotPosition = InStr(1, strProgID, ".")
    strNewName = Left(strProgID, findDotPosition - 1)
    
    Part.Export strNewName + ".igs"
    
    End Sub
    


    Now, how do I get it to either NOT skip the choosing-a-directory-to-export-to step that happens when program is exported manually, or even better to automatically dump it into my intended network folder?

    - Josh
Reply
  • Thanks Jonny

    Here's the completed working BAS:

    Sub main(AutomaticIGESout)
    
    Dim App As Object
    Set App = CreateObject("PCDLRN.Application")
    
    Dim Part As Object
    Set Part = App.ActivePartProgram
    
    Dim strProgID As String
    strProgID = Part.FullName
    
    Dim strNewName As String
    Dim findDotPosition
    
    Part.Save
    
    findDotPosition = InStr(1, strProgID, ".")
    strNewName = Left(strProgID, findDotPosition - 1)
    
    Part.Export strNewName + ".igs"
    
    End Sub
    


    Now, how do I get it to either NOT skip the choosing-a-directory-to-export-to step that happens when program is exported manually, or even better to automatically dump it into my intended network folder?

    - Josh
Children
No Data