FlexPro
HistoryBase
Ingénierie
Formation
Téléchargements
Support FlexPro
Connaissance
Communauté
À propos de nous
Références
Emplois
Contact général
Liste des revendeurs
Support FlexPro
FR
DE
EN
Porte-plaquette
Produits et solutions
Support et téléchargements
Entreprise
Magazine
Contact
Langue
MyWeisang

Paramètres du compte.

Topic

Error when deleting first Y axis (2D diagram with stacked Y axes)

Page d'accueil ' Communauté ' Automation et VBA ' Erreur lors de la suppression du premier axe Y (diagramme 2D avec axes Y empilés)

  • Ce sujet contient 2 réponses, 2 participants et a été mis à jour pour la dernière fois par Anonyme, le il y a 15 années et 5 mois.
Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Auteur
    Messages
  • #34780
    Anonyme
    Inactif

    Hello,

    I use a macro for deleting the first Y axis on 2D diagram embedded in a document.
    The Y axes are stacked. Initially, the diagramm hat at least two Y axes.

    Here’s the code :

    Dim objDoc as Document
    Dim objDiag as Diagram2D

    Set objDoc=ActiveDatabase.ActiveObject
    Set objDiag=objDoc.Pages(1).item(1).DocObject
    objDiag.YAxes(1).Delete

    This code works allways fine except for the first Y axis. The following error occurs :
    Err.Number = -2147467259
    Err.Description = Erreur non spécifiée
    Err.Source = FlexPro
    Err.HelpContext = 1000440
    Err.HelpFile = C:Programm FilesFichiers communsMicrosoft SharedVBAVBA61033VbLR6.chm

    I tried another solution :

    Dim objDoc as Document
    Dim objDiag as Diagram2D

    Set objDoc=ActiveDatabase.ActiveObject
    Set objDiag=objDoc.Pages(1).item(1).DocObject
    objDiag.YAxes(1).Line.Select
    objDiag.Selection.Delete

    With this alternative code, sometimes it works, sometimes the following error occurs :
    Err.Number = -2147467259
    Err.Description = Erreur non spécifiée
    Err.Source = FlexPro
    Err.HelpContext = 1000440
    Err.HelpFile = C:Programm FilesFichiers communsMicrosoft SharedVBAVBA61033VbLR6.chm

    I use FlexPro 8.0.21.

    Thanks for your help.

    #34781
    Bernhard Kantz
    Participant

    It’s not possible to delete the first Y-axis because a 2D- or a 3D-diagram needs at least one Y-axis and at least one X-axis.

    support@weisang.com

    #34782
    Anonyme
    Inactif

    I always check the number of Y axes : I want to delete the first Y axis (Y-Axis 1) [b]only[/b] if the diagram has more than one Y axis.

    Using the “2D Diagram Properties” dialog box, It’s not possible to delete the first Y axis, even if there are more than one Y axis.

    But when I select the first Y axis with the mouse, I can then delete it => That’s what I try to reproduce with my macro.

    I’ll try another solution.

    Thanks for your answer.

Voir les messages de 3 - 1 à 3 (sur un total de 3)
  • Vous devez être connecté pour répondre à ce sujet.