Hello Samuel,

The ports labels could be set on the on `blk.graphics.in_label` and 
`blk.graphics.out_label` depending on block's parameters by the interface 
function as it is done by the BIGSOM_f (or others). About the position, they 
are computed by Xcos as dataflow (on the left and right) or as eventflow (on 
the top and bottom) and it is not possible to fix them within the interface 
function.

You could also get the rotation, flip and mirror information from the 
blk.graphics.style value.

Thanks,

--
Clément DAVID

> -----Original Message-----
> From: dev <dev-boun...@lists.scilab.org> On Behalf Of Samuel Gougeon
> Sent: Tuesday, June 18, 2019 9:07 PM
> To: List dedicated to development questions <dev@lists.scilab.org>
> Subject: [Scilab-Dev] Xcos block: getting the position of ports in the 
> interface
> function
> 
> Hello,
> 
> It could be useful for some blocks to set the label according to some
> parameter's value.
> Now, i would like to set such a label with some Scilab code in the interface
> function, and to avoid overlaying the ports and links connected to them.
> 
> To do this, we need to know the position of ports, while the block might have
> been rotated.
> 
> I have found no block property (.graphics.*, .model.*) providing ports 
> positions
> (or the block orientation).
> Have i missed anything?
> Is there another way to detect ports positions ?
> 
> Thanks
> 
> Samuel
> 
> _______________________________________________
> dev mailing list
> dev@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/dev

Reply via email to