|
Hi Juan,
I would suggest then a hierarchical library, which makes things
easier:
- add an empty subsystem to core.mdl
- right click->Block properties
- go to "Callbacks" tab
- enter "act1" at OpenFcn
Now when you double click on the subsystem you will open
the act1 library.
Otherwise: what I suggested, works indeed. I made two libraries
(core and act1), added some block "MyGain" to act1, and used
add_block('act1/MyGain','core/MyGain')
to copy the block to core. This is no copy but a reference! And
when I drag that block from core to my testmodel, the reference
to act1 is still valid...
Titus
"Juan Manuel Romero Martin" <tingspain@gmail.com> schrieb im Newsbeitrag
news:ef5c2e3.3@webcrossing.raydaftYaTP...
> Hi Titus,
>
> But this is the problem, i wanna copy a few libraries into a core
> library (keeping the references) to make an organized library. So in
> that way, the users have all the libraries centralized and organized
> in a core one (interface). But the problem is that using add_block I
> loose the references between the core and the other libraries that I
> added into the core. Are you getting now what i am trying to do? HeHe
> really I would like to apologize. I am sometimes a little bit messy
> explaining myself.
>
> Juan
>
>
> Titus wrote:
>>
>>
>> Hi Juan,
>>
>> when you add a block from a library to a model, it will always
>> be a reference, not a copy, as long as you don't break the
>> link.
>> Let's say your subsystem in act1.mdl is called subJuan.
>> Then the call should be
>> add_block('act1/subJuan', 'core/subJuan')
>> and then you should see, that subJuan in core.mdl is a link
>> to your block subJuan in act1.
>>
>> Titus
>>
>>
>> "Juan Manuel Romero Martin" <tingspain@gmail.com> schrieb im
>> Newsbeitrag
>> news:ef5c2e3.1@webcrossing.raydaftYaTP...
>>> Titus wrote:
>>>>
>>>>
>>>> Hi Juan,
>>>>
>>>> the call to add_block is not correct: you can not add
>>>> the model to a library, but a block from the model,
>>>> so you need to do something like
>>>> add_block([getfullname(model) '/MyBlockToAdd'], ...
>>>> ['ssl/' getfullname(model)])
>>>>
>>>> Titus
>>>>
>>>
>>> Hi Titus,
>>>
>>> First of all, Thanks very much to answer. I really appreciated
>> it.
>>>
>>> Exactly, what i wanna do is to create a library (core.mdl)
>>> dynamically. This core is just a interface to organize other
>>> libraries that are stored in different folder. So the users can
>>> easily access to them. I got how to create dynamically the
>> core.mdl,
>>> and i thinks it is working more and less right. However, I
> don't
>> know
>>> how to add into the core a block (in this case Subsystem Block
>> that
>>> is stored in a mdl file) as a reference not as copy. It works
> if
>> i
>>> drag and drop it from, let say, act1.mdl to the core.mdl.
>> [act1.mdl
>>> is a library not a model, because i found that the model can
> not
>> be
>>> referenced]. Please I don't know if i explain myself clear
>> enough. My
>>> English is a little bit rusty. Please, if you don't understand
>> what i
>>> am trying to do, ask. And I will try to explain myself again.
>>>
>>>
>>> What i wanna do exactly is to have a system in which i modify
>>> act1.mdl, and the change can be reflected in the core.mdl. So I
>> can
>>> modified individually each file and the changes appear on the
>>> core.mdl.
>>>
>>> Thanks in advances,
>>> JuanMa
>>
>>
>>
|