Your Products have been synced, click here to refresh
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
'This script will export the features In the active program To a file of the Type specified by the extension value 'In the Part.Export Function Line. The export path And file Name are defined by concatenating the values of 'several variables defined In the PC-DMIS program. Sub Main(PN1 As String, OP1 As String, SN1 As String, RPTTIME1 As String, RPTDATE1 As String, IGS1 As String) Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim CADFullPath As String 'Concatenate variable values passed from PCD To create full path for new CAD file CADFullPath=IGS1 & PN1 & "\Results\IGES\" & PN1 & "_" & OP1 & "_" & SN1 & "_" & RPTTIME1 & "_" & RPTDATE1 'Call export Function. Change the value of the extension below To change the file Type exported. Part.Export CADFullPath + ".igs" End Sub
$$ NO, ***************************************** Export IGES ***************************************** ASSIGN/PN1=PN ASSIGN/OP1=OP ASSIGN/SN1=SN ASSIGN/RPTTIME1=RPTTIME ASSIGN/RPTDATE1=RPTDATE ASSIGN/IGS1=IGS ASSIGN/DIRECT="\\Results\\IGES\\" CS3 =SCRIPT/FILENAME= C:\BLADERUNNER\SCRIPTS\IGS_EXPORT.BAS FUNCTION/Main,SHOW=YES,ARG1=PN1,ARG2=OP1,ARG3=SN1,ARG4=RPTTIME1,ARG5=RPTDATE1,ARG6=IGS1,ARG7=DIRECT,, STARTSCRIPT/
My experience has been the same. I resorted to using PartProgram.GetVariableValue in my scripts instead of passing arguments. I never much cared for this because the program variable names are hard-coded into the script.One more thing about this process: for whatever reason PC-DMIS has been very finicky about passing variables to this script. Not sure why.
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |