Results 1 to 1 of 1

Thread: Why do i get Script error: Object Required

  1. #1
    Member
    Join Date
    2008-09
    Posts
    7
    Login to Give a bone
    0

    Post Why do i get Script error: Object Required

    I am new to Navis.I am working on Loading a NavisWorks file i.e NWD File in a Activex Control specified in <Object> which will be displayed in the browser. It works fine as an individual HTML Page. But If I embed the Same code in Web Application, It gives script error "Object Required 'NWControl01'" where 'NWControl01' is object Tag ID and also the other navigation functionality of the 3model except the default one like Walk or even the Views does not work. I have written the below given code in my aspx page which is the same as given in one of the examples given by Manage 2009
    Code:
    <object id="NWControl01" classid="CLSID:A168C4D5-286C-47b2-9FB0-4E0A2C16CCA7" codebase="~\Bin\Navis.cab">
    <param name="_cx" value="14000" />
    <param name="_cy" value="12000" />
    <param name="SRC" value="C:\TokmoNavis\gatehouse.nwd" />
    </object>
     
     <script language="VBScript" type="text/vbscript">
     
    <!--
        
    	public sub btnView_Clicked(cmd_ndx)
     
    		with NWControl01.state
    		
    			.ApplyView .SavedViews(cmd_ndx)
     
    		end with
     
    	end sub
     
     
     
    	public sub btnViewAll_Clicked()
     
    		NWControl01.state.ViewAll
    		NWControl01.state.HiddenItemsResetAll
     
    	end sub
     
     
     
    	public sub btnNav_Clicked(nmd_ndx)
     
    		NWControl01.state.CurrentView.ViewPoint.Paradigm = (nmd_ndx)
     
    	end sub
     
    	public sub btnLinkOn_Clicked()
     
    		NWControl01.state.URLsEnabled = TRUE
     
    	end sub
     
    	public sub btnLinkOff_Clicked()
     
    		NWControl01.state.URLsEnabled = FALSE
     
    	end sub
     
    	public sub btnLightOff_Clicked()
     
    		NWControl01.state.CurrentView.ViewPoint.Lighting = 0 
     
    	end sub
     
    	public sub btnLightOn_Clicked()
     
    		NWControl01.state.CurrentView.ViewPoint.Lighting = 3
     
    	end sub
     
     
    -->
        </script>
    Last edited by RobertB; 2008-09-18 at 03:59 PM. Reason: Added code tags.

Similar Threads

  1. 2014: Move Grouped Object using max script
    By dendenny01685584 in forum 3ds Max - General
    Replies: 0
    Last Post: 2014-12-14, 11:51 AM
  2. Revit Server installation - script required for this install could not be run.
    By r.howarth in forum Revit - Worksharing/Worksets/Revit Server
    Replies: 5
    Last Post: 2011-09-02, 02:16 PM
  3. Replies: 6
    Last Post: 2009-11-12, 03:32 PM
  4. Object required
    By rad.77676 in forum VBA/COM Interop
    Replies: 5
    Last Post: 2006-01-03, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •