Goran, have you got the STP output working?
I've created iLogic rules for exporting PDF, DXF & STP. (With help from Curtis Waguespack's From the Trences blog
)
The iLogic code that I use looks like this:
'define the model referenced by the drawing
Dim oModelDoc = ThisDoc.ModelDocument
' Get the STEP translator Add-In.
Dim oSTEPTranslator As TranslatorAddIn
oSTEPTranslator = ThisApplication.ApplicationAddIns.ItemById("{90AF7F40-0C01-11D5-8E83-0010B541CD80}")
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
If oSTEPTranslator.HasSaveCopyAsOptions(oModelDoc, oContext, oOptions) Then
'Options for STEP output
oOptions.Value("ApplicationProtocolType") = 3 'Set application protocol: 2 = AP 203 - Configuration Controlled Design, 3 = AP 214 - Automotive Design
oOptions.Value("Author") = ThisApplication.GeneralOptions.UserName
oOptions.Value("Authorization") = ""
oOptions.Value("Tolerance") = "0.00001 mm"
oOptions.Value("Description") = iProperties.Value("Summary", "Title")
oOptions.Value("Organization") = "IKM Technique AS"
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
Dim oData As DataMedium
oData = ThisApplication.TransientObjects.CreateDataMedium
FilePath= ThisDoc.Path 'This .IDW's path
OutputPath = FilePath & "\" & "STP" 'Output destination for the new STP
OutputFileName = iProperties.Value("Custom", "Output File Name") & ".stp" 'Output File Name as specified in Custom iProperties, as specified by the iLogic rule OutputFileName
'Check for existance of STP folder and create if not found
If Not System.IO.Directory.Exists(OutputPath) Then
System.IO.Directory.CreateDirectory(OutputPath)
End If
'Set the destination path & file name
oData.FileName = OutputPath & "\" & OutputFileName
'Publish Document
oSTEPTranslator.SaveCopyAs(oModelDoc, oContext, oOptions, oData)
End If
I also export drawings with a revision suffix. I have another iLogic rule which runs automatically (Event Triggers) everytime the drawing is saved. This iLogic rule creates a custom iProperty containing current revision, which is used for the file names of the exported PDF, DXF and STP files. Which is why I specify export destination and file name the way I do.