Use (block) handles within Java

Hello everybody,
I want to read the information of a simulink model in java. So far, everything is straightforward except for the connectors between the the blocks and ports. If i call get_param for 'PortConnectivity' I get a value 13.0010 for the DstBlock. This seems to be the id of the handler. Is it possible to work with this id, for e.g.
get_param(13.0010, 'Name')
This is important to use the handles in java.
I am thankful for any help.
Greets

 Accepted Answer

Titus Edelhofer
Titus Edelhofer on 23 Nov 2011
Hi,
yes and no: you can use get_param for retrieving information, but not by using 13.0010 (since this is the string representation of some double precision number, the call above will give an error about unknown handle). Working with the double you got from the previous get_param call will work.
Titus

More Answers (1)

ptrash
ptrash on 23 Nov 2011
Thanks a lot. It works.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!