Sep 13 2018 Feedback.
Contents
 
Introduction
Help Videos
Reference Guide
Getting Started
Protein Structure
Molecular Graphics
Slides & ActiveICM
 Make Slides
 Slide Movie
 View Slides
 Edit Slides
 Effects
 Documents
 ActiveICM
 PowerPoint 2003
 PowerPoint 2007
 PowerPoint 2010
 Embed browser
 Present
 Properties
 Activeicm advanced
  Cache Error
 Background Images
 IcmJS
Tutorials
 
Index
PrevICM User's Guide
7.14 Advanced use of activeICM: Macros to direct visualisation changes
Next

[ Cache Error ]

Documentation kindly provided by Dr. Brian Marsden (SGC Oxford http://www.sgc.ox.ac.uk/people/brian/ )

It is possible to write simple VisualBasic scripts to avoid having to use the right-click menu approach to changing activeICM control slides within the control itself. This allows one to place buttons outside of the activeICM control, but in the same PowerPoint slide, which controls the control's behaviour. Below are a couple of useful examples of this approach.

Creating a button to set the control's active slide:

Insert a button Office 2003

  • In edit mode, make sure the control toolbox toolbar is shown by right-clicking the blank area at the top of the top bar and ensuring Control Toolbox is ticked.

  • Click on an icon in the Control Toolbox which corresponds to the sort of button you wish to use. Then click and drag in the PowerPoint slide to generate the button.
Insert a button Office 2007:
  • In edit mode, click on an icon in the Developer menu or ribbon which corresponds to the sort of button you wish to use. Then click and drag in the PowerPoint slide to generate the button.

  • Double-click on the new button to open the VisualBasic editor with two empty functions pre-defined. The first one pertains to the control itself and can be ignored in this context *For the second function (which is for the newly-created button), copy the following into the editor, between the two lines of function code:


ActiveIcmCtl1.currentSlide = 2

  • This sets the current activeICM control's slide to be number 3 note that the value placed in this code needs to be 1 less than the actual slide number (confusing, no?). Obviously, use a value here that makes sense in the context of your ICB file.
  • This should leave the editor looking like this:

  • Close the Visual Basic editor
  • To change the physical properties of the button e.g. text, colour e.t.c.right-click on the button and select the Properties menu option. This opens up a dialogue as below, where many properties of the button can be changed:

  • Using this dialogue, it should be possible to disguise the button to look like normal text (for example) which can be clicked on during the presentation to change the visualisation of the control, apparently magically. Note that the button will only work in presentation mode.
  • IMPORTANT: In Office 2007, remember to save the PowerPoint presentation now as a pptm file that is, a macro-enabled PowerPoint file otherwise the macros will not work next time you load the presentation.

Other code examples: Just copy and paste the example of interest inside the function for the button in the Visual Basic editor. Code that enables a button to cycle through the ICB files slides in order (including wrap-around)


currentSlide = ActiveIcmCtl1.currentSlide
numSlides = ActiveIcmCtl1.nofSlides
If currentSlide = numSlides - 1 Then
ActiveIcmCtl1.currentSlide = 0
Else
ActiveIcmCtl1.currentSlide = currentSlide + 1
End If

7.14.1 PowerPoint Cache Errors


PowerPoint caches some information about active controls. Sometimes after an ActiveICM upgrade you may get an error when trying to access some property or method: "Wrong number of arguments or invalid property assignment" or something similar.

In this case you need to close PowerPoint and remove all files from the location below:

C:\Documents and Settings\seva\Local Settings\Temp\PPT11.0


Prev
Properties
Home
Up
Next
Background Images

Copyright© 1989-2018, Molsoft,LLC - All Rights Reserved.
This document contains proprietary and confidential information of Molsoft, LLC.
The content of this document may not be disclosed to third parties, copied or duplicated in any form,
in whole or in part, without the prior written permission from Molsoft, LLC.