![]() |
Constrain port to be in one binding |
Post Reply
|
| Author | |
jkouwer
Major Contributor
Joined: 08.Mar.2010 Points: 22 |
Post Options
Thanks(0)
Quote Reply
Topic: Constrain port to be in one bindingPosted: 04.Jun.2010 at 10:23 |
|
Hello,
I would like to restrict the number of possible bindings for my port to exactly one. Is this possible? I can find how to constrain objects to be part in just one relationship, but I cannot find how to do this for the ports of an object. I'm trying to make a cable diagram editor and each physical port of the computer can handle just one cable, so... Regards, Jeroen Kouwer |
|
![]() |
|
stevek
MetaCase
Joined: 11.Mar.2008 Points: 643 |
Post Options
Thanks(0)
Quote Reply
Posted: 04.Jun.2010 at 12:35 |
|
Hello Jeroen,
You can edit the symbol for the object or the role, so that it shows an error symbol or message when the port is used multiple times. E.g. assuming ports named port1, port2 etc., put a red exclamation mark (or whatever) in the object symbol next to port1, and give it a conditional:
do ~()#() where id = 'port1' { 'X' }
Show the symbol if the output of that is equal to XX, XXX etc. (wildcard comparison with XX*)
In future versions we're looking at adding more hard constraints for cases like this.
Cheers,
Steve
|
|
![]() |
|
jkouwer
Major Contributor
Joined: 08.Mar.2010 Points: 22 |
Post Options
Thanks(0)
Quote Reply
Posted: 04.Jun.2010 at 14:56 |
|
Hello Steve,
That did the job. Now I have visual feedback (indeed, the red exclamation mark) when there are too many connections on one port. Thanks, Jeroen KOuwer |
|
![]() |
|
Post Reply
|
|
| Tweet |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |