Jump to content
Software FX Community
Sign in to follow this  
User (Legacy)

Microsoft VBScript runtime error '800a01fb'

Recommended Posts

Hi I am getting this error:

Microsoft VBScript runtime error '800a01fb'

An exception occurred: 'AddPicture'

/iroquois/utilization/test.asp, line 46

Here is the code:

<!-- Include these files so we can use all the ChartFX constants -->

<!-- #include virtual="/Include/CfxIE.inc" -->

<!-- #include virtual="/Include/CfxIECmds.inc" -->

<!-- #include virtual="/Include/CfxIEExtra.inc" -->

<SCRIPT LANGUAGE="VBScript">

<!--

Sub ChartFX1_UserCommand(wParam,lParam,nRes)

MsgBox "Custom Command"

End Sub

-->

</SCRIPT>

<%

Set chart = Server.CreateObject("ChartFX.WebServer.4")

' The samples look better in white

chart.RgbBk = RGB(255,255,255)

chart.Rgb2DBk = RGB(255,255,255)

' Open Communications channel for 1 series and 8 points

Chart.OpenDataEx COD_VALUES,1,8

Chart.ThisSerie=0

Chart.Value(0) = 10

Chart.Value(1) = 14

Chart.Value(2) = 12

Chart.Value(3) = 16

Chart.Value(4) = 8

Chart.Value(5) = 6

Chart.Value(6) = 32

Chart.Value(7) = 24

' Close the communications channel

Chart.CloseData COD_VALUES

'This code adds a predefined ChartFX button to the popup menu when the

user right clicks the background.

Chart.Commands(CFX_ID_CM_BACKGROUND).InsertSubCommands 1, 12

Chart.Commands(CFX_ID_CM_BACKGROUND).SubCommandID(12) =

CFX_ID_EXPORTBITMAP

'Load a 16x15 size bitmap to be used as a toolbar icon

'Please note that the image needs to have "Full Control" security for

IUser_MachineName

sPhysical = Server.MapPath("/Art/Samples/button.bmp")

Set Pict = Chart.LoadPicture(sPhysical)

'Create a New Command

Set NewCommand = Chart.Commands.AddCommand(100)

'Assing the bitmap icon to the new command

NewCommand.Picture = (Chart.Commands.AddPicture(Pict))

NewCommand.Text = "Custom Command"

' Add command to the toolbar and define it's position at the end

Chart.ToolBarObj.AddItems 1, 22

Chart.ToolBarObj(22).CommandID = 100

'Enable the chartfx toolbar

chart.toolbar = true

' Create Annotation Object to point to the new ToolBar Button

Set AnnotX = Server.CreateObject("AnnotationX.AnnList")

' Add Annotation List to ChartFX

Chart.AddExtension AnnotX

'Turn off the annotation toolbar

annotx.toolbar=false

Set r = AnnotX.Add(3)

r.Attach 1, cstr("9.15,32")

r.Width = 0

r.Height = -60

r.BkColor = RGB(255, 255, 0)

r.BorderWidth = 2

r.TailStyle = 0

r.HeadStyle = 1

%>

<%= chart.GetHtmlTag(500,350,"Auto","ChartFX1") %>

We are using CartFX ie2000 on win2K server

Share this post


Link to post
Share on other sites

We are unable to reproduce this problem using the latest SP.

The code you have produces the expected results when we run it here. We get

a button at the end of the toolbar with the custom image.

Please make sure that:

1) You are using the latest SP

2) The picture you are reading is the correct format. I tried with both

Bitmap 24-Bit color and Bitmap 256 colors and it worked fine

3) Make sure the picture is the correct size (Width = 16, Height = 15)

4) Make sure you have read permissions (as a web user) in the directory

where the picture file is.

--

FP

Software FX

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...