Import BOM from drawing document and https

I am using VBscript to call the SolidWorks API to open a drawingdocument in Solidworks on the client machine, given a sharednetwork path to the file, insert a BOM table in the document, thenextract the BOM data to be displayed and manipulated on the webpage.


On an http site the script worked just fine, but now attempting touse the same code on an identical https site produces the followingerrors:


Error: Object required: 'drawDoc'Code: 0URL: /main/BOM/view/index.cfm

11 occurrences of "Error: Expected end ofstatement"

4 occurrences of "Error: Cannot use parentheses when calling aSub."


The code is as follows:


language="vbscript">

FunctionretrieveBOM(filePath, templatePath)

dimswApp

dimswModel

dimdrawDoc

dimswView

dimswBomTable

dimswTable

dimnumCols

dimnumRows

dimisActivatedView

dimbomContents

dimrowStr

dimitemTxt

 

bomContents = ""

set swApp=CreateObject("SldWorks.Application")

setswModel =swApp.OpenDoc(filePath, 3)

setdrawDoc =swModel

set swView=drawDoc.GetFirstView()

isActivatedView =drawDoc.ActivateView(swView.GetName2())

Do WhileisActivatedView =false

set swView=swView.GetNextView()

If swView IsNothing Then

ExitDo

End If

isActivatedView =drawDoc.ActivateView(swView.GetName2())

Loop

 

IfisActivatedView =true Then

setswBomTable =swView.InsertBomTable2(false,0, 0, 1,3, "",templatePath)

If swBomTable IsNothing Then

 

Else

setswTable =swBomTable

maxColumn=swTable.ColumnCount - 1

maxRow=swTable.RowCount- 1

MsgBoxmaxRow

Fori=1to maxRow

rowStr=""

Forj=0to maxColumn

itemTxt=swTable.Text(i,j)

IfitemTxt =""Then

itemTxt="000--blank--000"

EndIf

 

rowStr=rowStr &itemTxt

If j<maxColumn Then

rowStr=rowStr &","

EndIf

Next

rowStr=rowStr &"|"

bomContents =bomContents &rowStr

Next

 

hiddenForm.bomImportString.value=bomContents

EndIf

End If

 

swApp.CloseAllDocuments(true)

swApp.ExitApp()

setswApp=nothing

retrieveBOM =bomContents

EndFunction

...

language="vbscript">

dimcontents

contents=retrieveBOM(hiddenForm.filepath.value, hiddenForm.templatePath.value)

hiddenForm.bomImportString.value= contents

 

IfhiddenForm.action.value="importBeginPDM"Then

hiddenForm.action.value ="createFromPDMImport"

ElseIfhiddenForm.action.value="updateBeginPDM"Then

hiddenForm.action.value ="createFromPDMUpdate"

EndIf

 

hiddenForm.submit()



I'm new to VBScript and fairly new to the SolidWorks API, and amunsure what would cause this script to fail on an https page. Doesanyone have any suggestions?

SolidworksApi macros