简体   繁体   English

Visio Master Shape Data - 来自数据库的下拉菜单

[英]Visio Master Shape Data - dropdown from database

I have a seemingly straightforward Visio question that I am trying to find out if it is even possible to achieve:我有一个看似简单的 Visio 问题,我试图找出它是否有可能实现:

Can I create a set of master shapes, with each master shape representing a type of 'thing', for example it could be that one shape represents a monitor and another a keyboard, another a mouse, and so on...and provide the user the ability to select the model / product code / sku or whatever as a shape data field (eg/ Prop.Make, Prop.Model, Prop.SKU and so on) with the data for the dropdown being provided from either a database or SharePoint list?我能否创建一组主形状,每个主形状代表一种“事物”,例如,一个形状代表显示器,另一个代表键盘,另一个代表鼠标,等等......并提供用户可以将 select model / 产品代码 / sku 或任何形状数据字段(例如 / Prop.Make、Prop.Model、Prop.SKU 等)与从数据库或SharePoint名单?

This way the user will always be able to fill in current information for a shape by selecting the particular 'thing' that it is from the database and the appropriate value options are shown to them to choose from.这样,用户将始终能够通过从数据库中选择特定的“事物”来填充形状的当前信息,并向他们显示适当的值选项以供选择。

Is anything like this possible?这样的事情可能吗? It would certainly help with some of the designs that need to be done by less experienced users.它肯定会帮助一些需要由经验不足的用户完成的设计。

Any help greatly appreciated.非常感谢任何帮助。

The Frog青蛙

If you use Visio 2010+ Professional edition ( not Standard ) you can use Data linking .如果您使用 Visio 2010+专业版(非标准版),您可以使用数据链接 在此处输入图像描述

It is feasible, but requires some coding.这是可行的,但需要一些编码。

Key is to be able to connect to your DB ( https://www.connectionstrings.com/ ), query it with a set of parameters that you would define, choose the right item from the set of returned rows, then populate the custom properties of your shape with this chosen item.关键是能够连接到您的数据库 ( https://www.connectionstrings.com/ ),使用您将定义的一组参数查询它,从返回的行集中选择正确的项目,然后填充自定义您的形状属性与此所选项目。

I hope you are proficient enough with a coding system (VBA, C#, ...) and the shapesheet.我希望您对编码系统(VBA、C# 等)和形状表足够熟练。 Otherwise you can use the solution suggested by Surrogate - choosing a row from a database table or query.否则,您可以使用 Surrogate 建议的解决方案 - 从数据库表或查询中选择一行。 But that is not exactly what you asked for.但这并不完全是您所要求的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM