Boutons
doivent être soumis à /libs/pappserver/webapps/3dfindit-enterprise/custom_config.json
.
Le fichier de configuration contient une section principale avec quelques paramètres par défaut pour 3Dfindit, puis une section Barres d'outils.
Un bouton de barre d'outils peut être affiché au-dessus du tableau ou au-dessus de la vue 3D. Ceci est défini dans les items viewer / table.
Les boutons eux-mêmes et leur fonctionnalité sont définis dans la section Buttons. Chaque bouton a un type, qui est soit JS soit VBS:
Chaque bouton a une icône et un nom.
{
"baseApiPath": "",
"basename": "/webapps/3dfindit-enterprise",
"erp": true,
"startRoute": "CadBim",
"isEnterprise": true,
"toolbars": {
"viewer": ["exampleButton"],
"table": ["exampleVBSButton"],
"buttons": {
"exampleButton": {
"type": "JS",
"name": {
"de-DE": "JS Beispiel",
"en-GB": "JS Example"
},
"callback": "onExampleButtonClicked",
"icon": "images/bell-solid.svg",
"tooltip": {
"de-DE": "JS Beispiel",
"en-GB": "JS Example"
}
},
"exampleVBSButton": {
"type": "VBS",
"icon": "images/bell-solid.svg",
"name": {
"de-DE": "VBS Beispiel",
"en-GB": "VBS Example"
},
"script": "/plugins/vbb/wstest.vbs",
"requestFromPdm": "currentuser",
"tooltip": {
"de-DE": "VBS Beispiel",
"en-GB": "VBS Example"
}
}
}
}
}
A partir de la version 12.9, il existe d'autres possibilités. Des boutons peuvent également être ajoutés dans la barre principale et dans la zone des résultats de recherche (différents s'il y a des résultats ou non).
Au-dessus des résultats de recherche :
Dans la section des résultats de recherche, pour les résultats existants :
Dans le menu contextuel des résultats de recherche
{ "baseApiPath": "", "basename": "/webapps/3dfindit-enterprise/", "erp": true, "startRoute": "CadBim", "isEnterprise": true, "toolbars": { "viewer": ["exampleButton"], "table": ["exampleVBSButton"], "searchResultsContextMenu": ["exampleButton", "exampleVBSButton"], "buttons": { "exampleButton": { "type": "JS", "name": { "de-DE": "JS Beispiel", "en-GB": "JS Example" }, "callback": "onExampleButtonClicked", "icon": "images/bell-solid.svg", "tooltip": { "de-DE": "JS Beispiel", "en-GB": "JS Example" } }, "exampleVBSButton": { "type": "VBS", "icon": "images/bell-solid.svg", "name": { "de-DE": "VBS Beispiel", "en-GB": "VBS Example" }, "script": "/plugins/vbb/wstest.vbs", "requestFromPdm": "currentuser", "tooltip": { "de-DE": "VBS Beispiel", "en-GB": "VBS Example" } } } } }
Dans l'exemple de code suivant, les nouvelles options sont marquées en bleu.
{
"defaultLoginMethod": "openid"
"baseApiPath": "",
"basename": "/webapps/3dfindit-enterprise",
"erp": true,
"startRoute": "CadBim",
"isEnterprise": true,
"toolbars": {
"viewer": ["exampleButton"],
"table": ["exampleVBSButton"],
"mainMenuIcon": "./plugins/img/3dFinditEyeColor.svg",
"mainMenu": [
["customButton1_Group1", "customButton2_Group1", "customButton3_Group1"],
["customButton1_Group2", "customButton2_Group2", "customButton3_Group2"]
],
"noResults": ["customButton1", "customButton2", "customButton3"],
"searchResults": ["customButton1", "customButton2", "customButton3"],
"buttons": {
"customButton1_Group1": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
}
},
"customButton2_Group1": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
},
"script": "/plugins/vbb/custom2_startup.vbs",
"tooltip": {
Exemple complet : les illustrations ci-dessus montrent le résultat à titre d'exemple.
{
"defaultLoginMethod": "openid"
"baseApiPath": "",
"basename": "/webapps/3dfindit-enterprise",
"erp": true,
"startRoute": "CadBim",
"isEnterprise": true,
"toolbars": {
"viewer": ["exampleButton"],
"table": ["exampleVBSButton"],
"mainMenuIcon": "./plugins/img/3dFinditEyeColor.svg",
"mainMenu": [
["customButton1_Group1", "customButton2_Group1", "customButton3_Group1"],
["customButton1_Group2", "customButton2_Group2", "customButton3_Group2"]
],
"noResults": ["customButton1", "customButton2", "customButton3"],
"searchResults": ["customButton1", "customButton2", "customButton3"],
"buttons": {
"exampleButton": {
"type": "JS",
"name": {
"de-DE": "JS Beispiel",
"en-GB": "JS Example"
},
"callback": "onExampleButtonClicked",
"icon": "images/bell-solid.svg",
"tooltip": {
"de-DE": "JS Beispiel",
"en-GB": "JS Example"
}
},
"exampleVBSButton": {
"type": "VBS",
"icon": "images/bell-solid.svg",
"name": {
"de-DE": "VBS Beispiel",
"en-GB": "VBS Example"
},
"script": "/plugins/vbb/wstest.vbs",
"requestFromPdm": "currentuser",
"tooltip": {
"de-DE": "VBS Beispiel",
"en-GB": "VBS Example"
}
},
"customButton1_Group1": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
}
},
"customButton2_Group1": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
},
"script": "/plugins/vbb/custom2_startup.vbs",
"tooltip": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
}
},
"customButton3_Group1": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 3 de",
"en-GB": "custom button 3 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 3 de",
"en-GB": "custom button 3 en"
}
},
"customButton1_Group2": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
}
},
"customButton2_Group2": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
},
"script": "/plugins/vbb/custom2_startup.vbs",
"tooltip": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
}
},
"customButton3_Group2": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 3 de",
"en-GB": "custom button 3 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 3 de",
"en-GB": "custom button 3 en"
}
},
"customButton1": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 1 de",
"en-GB": "custom button 1 en"
}
},
"customButton2": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
},
"script": "/plugins/vbb/custom2_startup.vbs",
"tooltip": {
"de-DE": "custom button 2 de",
"en-GB": "custom button 2 en"
}
},
"customButton3": {
"type": "VBS",
"icon": "./plugins/img/3dFinditEyeColor.svg",
"name": {
"de-DE": "custom button 3 de",
"en-GB": "custom button 3 en"
},
"script": "/plugins/vbb/custom1_startup.vbs",
"tooltip": {
"de-DE": "custom button 3 de",
"en-GB": "custom button 3 en"
}
}
}
}
}

![[Remarque]](https://webapi.partcommunity.com/service/help/latest/pages/fr/3dfindit/doc/images/note.png)




