Message 1 of 3
"Set iLogicAuto = GetiLogicAddin(ThisApplication)" throws an error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
For some reason I can never get this line to work for me. I've tried using it in a couple of different API routines and it never cooperates. It throws a "Sub or Function not defined" error. I copy/pasted it from a sample. Here's the sub I'm working on at the moment that calls it:
Option Explicit Private Sub CommandButton1_Click() Dim iLogicAuto As Object Dim curDoc As Document Dim curVal As String Dim box As Boolean Dim TA As Single Dim TB As Single Dim TC As Single Dim TD As Single Dim TE As Single Dim TF As Single Dim BA As Single Dim BB As Single Dim BC As Single Dim BD As Single Dim BE As Single Dim BF As Single Set iLogicAuto = GetiLogicAddin(ThisApplication) If (iLogicAuto Is Nothing) Then box = MsgBox("GetiLogicAddin failed!", vbCritical, "Critical Error!") Exit Sub End If TA = boxTA.Value TB = boxTB.Value TC = boxTC.Value TD = boxTD.Value TE = boxTE.Value TF = boxTF.Value If botEqTop = True Then BA = TA BB = TB BC = TC BD = TD BE = TE BF = TF Else BA = boxBA.Value BB = boxBB.Value BC = boxBC.Value BD = boxBD.Value BE = boxBE.Value BF = boxBF.Value End If Set curDoc = ThisApplication.ActiveDocument iLogicAuto.ParamValue(curDoc, "topPlateWidth") = TA iLogicAuto.ParamValue(curDoc, "topPlateLength") = TB iLogicAuto.ParamValue(curDoc, "holeHorzOff") = TC iLogicAuto.ParamValue(curDoc, "holeVertOff") = TD iLogicAuto.ParamValue(curDoc, "squareHoleLength") = TE iLogicAuto.ParamValue(curDoc, "squareHoleWidth") = TF iLogicAuto.ParamValue(curDoc, "botPlateWidth") = BA iLogicAuto.ParamValue(curDoc, "botPlateLength") = BB iLogicAuto.ParamValue(curDoc, "botHoleOffsetX") = BC iLogicAuto.ParamValue(curDoc, "botHoleOffsetZ") = BD iLogicAuto.ParamValue(curDoc, "botSquareHoleLength") = BE iLogicAuto.ParamValue(curDoc, "botSquareHoleWidth") = BF flangesShole.Hide End Sub
Thanks in advance for any suggestions,
Mike
Mike (not Matt) Rattray
