Using replace_block with Simscape

I want to replace a simscape block with another one. This doens't work:
replace_block('vdp','Constant Area Pneumatic Orifice','fl_lib/Pneumatic/Pneumatic Elements/Variable Area Pneumatic Orifice','noprompt')
What am I doing wrong? Thanks in Advanced

 Respuesta aceptada

Sebastian Castro
Sebastian Castro el 16 de Jul. de 2015

0 votos

Just tried the same command as you and it works fine on my end... although the block name stays the same. Is that maybe the case for you too?
- Sebastian

1 comentario

replace_block('vdp',sprintf('Constant Area\nPneumatic Orifice'),'fl_lib/Pneumatic/Pneumatic Elements/Variable Area Pneumatic Orifice','noprompt')
I found out, the \n was missing. This way it works!
Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Foundation and Custom Domains en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Jul. de 2015

Comentada:

el 16 de Jul. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by