Problem with script

I have several scripts that use remap to export using the current UCS they export to different file types and all have a sub called ReMapExport.

Private Sub ReMapExport()
	Dim strFilename, strTemplateFolder, strTempFile
	
	strTempFile = "C:\temp\temp.igs"
	
	If Not IsNull(strFilename) Then

		Rhino.Command "-Export _-pause " & strTempFile & " _Enter", False

	End If


End Sub

The problem is all the scripts end up using the sub from the last script loaded, so is there a way to make sure each script uses it’s own sub without having a different name in each script.

Thanks Mark

Hi Mark- not that I know of, however you might think about making the one sub with some arguments, inputs, like the file extension, so that it can be called repeatedly

Sub ReMapExport(strFileExtension)

strTempFile = “C:\temp\temp.” & “strFileExtension”

etc etc
and whatever is calling this sub will specify strFileExtension as “igs” or whatever in each case.

-Pascal

Hi Pascal, OK thanks I’ll need to just have a different name for each then. I use some of the scripts to export and start other programs with the exported file, there’s a bit more to some of them.

Thanks Mark.