Enforcing valid connections

B

brad

I'm designing a high-pressure gas system and would like to improve my
use of Visio's features... if the ones I want even exist.

I have a bunch of components (valves, tees, sensors, etc) that have
connections of various sizes. For example, I might have a pressure
transducer with an 1/4" NPT fitting and a valve with a 1/4" swagelok
fitting. Obviously, I'll need an adapter to go from NPT to swagelok.
Is there a way to force Visio to automatically prohibit connecting
these shapes without the appropriate adapter shape?

Basically, I want to be able to specify a connector as a certain sized
tube. If the tube does not properly interface with a part, I don't
want the connector to be able to snap the part's shape.

TIA.
 
A

Al Edlund

The type of request is very common. The issue is that it requires domain
specific knowledge to implement and as such will probably require that custom
code be written.

al
 
B

brad

In terms of domain-specific knowledge, yes and no.

If I wanted something precisely matching up to my needs (eg: 1/4"
swagelok vs. 1/4" NPT), then I would need some custom code.

But what I really want is just enhanced capability for connectors and
connection points. That is, a connection point could have a custom
property (much like a shape has) that allows only connectors with a
particular custom property. For example:

-Set the "Allow only" property of a connection point to '1/4" NPT'
-At this point, a generic connector is not allowed to connect to the
connection point.
-Set the "Connector type" property of a connector to '1/4" NPT'
-Now this connector can connect to the customized connection point.

From what I can tell, connection points do not have custom properties.
Assuming this functionality isn't built into Visio, does the API/SDK
allow for such modifications?

Thanks,
-brad
 
P

Paul Herber

In terms of domain-specific knowledge, yes and no.

If I wanted something precisely matching up to my needs (eg: 1/4"
swagelok vs. 1/4" NPT), then I would need some custom code.

But what I really want is just enhanced capability for connectors and
connection points. That is, a connection point could have a custom
property (much like a shape has) that allows only connectors with a
particular custom property. For example:

-Set the "Allow only" property of a connection point to '1/4" NPT'
-At this point, a generic connector is not allowed to connect to the
connection point.
-Set the "Connector type" property of a connector to '1/4" NPT'
-Now this connector can connect to the customized connection point.

From what I can tell, connection points do not have custom properties.
Assuming this functionality isn't built into Visio, does the API/SDK
allow for such modifications?

You could allocate a number for each type of connection
1 = 1/4" NPT
2 = something else
n = .... for however many types
For each connection point have a custom property or user-defined cell
that contains the connection type.
A fairly simple addon could just have an event handler for connections
being made, this could check the connection type and if inappropriate
do something. I don't think you can prevent the connection being made
initially, you can only detect that this connection is being
requested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top