An error occurred while editing the AddFile and removefile methods for the style serverstyle files used in arcengine.

Source: Internet
Author: User
Content summary
When an applicationProgram*. Serverstyle file, and then use the AddFile and removefile methods of istylegallerystorage.
Process description

'If the *. serverstyle file is not set to another one after it is imported, an error occurs when you try again. The AddFile method and removefile method will fail. The test environment VB6.0 + arcengine Dev 9.1

Private sub commandementclick ()
Dim AAA as istylegallery
Set AAA = new serverstylegallery
Dim BBB as istylegallerystorage
Set BBB = aaa
Bbb. AddFile app. Path & "transportation. serverstyle"
Bbb. removefile app. Path & "transportation. serverstyle"
AAA. Clear
Set AAA = nothing
End sub

Private sub form_load ()
Dim A as istylegallery
Set a = new serverstylegallery
Dim B as istylegallerystorage
Set B =
B. targetfile = app. Path & "transportation. serverstyle"
Msgbox B. canupdate (App. Path & "transportation. serverstyle ")

Dim symbol as imarkersymbol
Set symbol = new simplemarkersymbol

Dim item as istylegalleryitem
Set item = new serverstylegalleryitem
Item. Item = symbol
Item. Category = "guide sign"
Item. Name = "test"
A. additem item
B. removefile app. Path & "transportation. serverstyle"
'If the following sentence is not set, an error will occur.

B. targetfile = "D:/DF. serversytle "
. clear
set a = nothing
Set B = nothing
'B. targetfile = "" cannot be blank
end sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.