laptop and a wrench

Bogue

Calling IStyleGallery::LoadStyle fails with an unspecified error for a ServerStyleGallery

Dernière publication: August 25, 2014 No Product Found
Numéro d’ID de bogue NIM001002
EnvoiFebruary 7, 2006
Dernière modificationJune 5, 2024
S’applique àNo Product Found
Version trouvée9.1
Version de correctionN/A
StatutFixed

Solution de contournement

The server style gallery doesn’t have an initialized “targetfile” so you need to set it before doing anything. You don’t see this issue with the regular stylegallery because the application sets up the “targetfile” at startup.You need to do it like this:Public Sub Test()Dim pSG As IStyleGallerySet pSG = New ServerStyleGalleryDim pSGS As IStyleGalleryStorageSet pSGS = pSG'TODO - CHANGE THIS TO POINT TO A PATH YOU CAN WRITE TOpSGS.TargetFile = "C:\temp\test.ServerStyle"' TODO - CHANGE THIS TO POINT TO YOUR OWN SERVER STYLE FILE.Dim strStyleFile As StringstrStyleFile = "C:\ArcGIS\Styles\ESRI_Optimized.ServerStyle"pSG.LoadStyle strStyleFile, "Text Symbols"MsgBox pSG.ClassCountEnd Sub

Étapes pour reproduire

ID de bogue: NIM001002

Logiciel:

  • No Product Found

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement