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

Diagram name

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

    Hi,

    I would like to create a variable into the VBA writter tool which can takes the name of the active diagram seleced.

    For exemple, I have 4 curves plots on a diagram. This diagram, instead of the classic “2D Diagram” name, I choose to rename this by “Export00”.
    How can I creat a variable which will be the name of this diagram called “Export00”?

    Thank you in advance,

    Zelka.

    #35217
    Anonyme
    Invité

    Hi,

    I would like to create a variable into the VBA writter tool which can takes the name of the active diagram seleced.

    For exemple, I have 4 curves plots on a diagram. This diagram, instead of the classic “2D Diagram” name, I choose to rename this by “Export00”.
    How can I creat a variable which will be the name of this diagram called “Export00”?

    Thank you in advance,

    Zelka.

    #35216
    Bernhard Kantz
    Participant

    To access the database currently working on, use the global [b]ActiveDatabase [/b]property. You may also use [b]ThisDatabase [/b]to access the project database containing the VBA code.
    The [b]Database [/b]object has an [b]ActiveObject [/b]property to use the [b]FpObject [/b]which has the focus. There are also properties [b]Selection [/b]and [b]SelectedObject [/b]to get the object(s) chosen in the object list.
    The name of an object can be obtained by the property [b]Name[/b], the full path (including extension) with [b]Fullname[/b].

    [code]
    Dim oFpObj As FpObject
    Set oFpObj = ActiveDatabase.ActiveObject

    Select Case oFpObj.ObjectType
    Case fpObjectType2DDiagram
    MsgBox “Selected 2D-Diagram: ” & oFpObj.Name & vbCrLf _
    & “(Full path name: ” & oFpObj.FullName & “)”
    Case fpObjectType3DDiagram
    MsgBox “Selected 3D-Diagram: ” & oFpObj.Name & vbCrLf _
    & “(Full path name: ” & oFpObj.FullName & “)”
    Case Else
    MsgBox “Selected Object: ” & oFpObj.Name & vbCrLf _
    & “(Full path name: ” & oFpObj.FullName & “)”
    End Select
    [/code]

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