Dear DSPC Team,
I am trying to redesign a layout from Designer with the MATLAB - API and then save it as a Designer layout file again and then open and run it in the AWE Designer.
All is going well until I try to add a module. When I am adding a Module I can't see it in the Designer layout.
I get the following message when I open the new designed sub-system:
"connection_to_canvas.p(0): CreateWire failed: failed,-14,no such module as 'M33'"
Can you please advise me on how to correctly export a Matlab API designed system to the AWE Designer with no issues?
Thanks in advanced,
Sharon.
1:55pm
Hi Sharon,
Can you please share some example code and provide detailed steps of the workflow sequence you are currently following? That would help in troubleshooting the issue.
Thanks,
Michael
1:23pm
Hi Michael,
I'll do my best in explaining.
I attached some files (5).
The Matlab script loads the redesignexample.awd file and add 2 modules and the needed connections. Build the new system and save it to a new awd file.
The script then loads both systems and draw them. The figures are attached as well.
Both systems looks good.
When I try to open the up_scaled system in AWE Designer I get the following errors:
connection_to_canvas.p(0): CreateWire failed: failed,-14,no such module as 'M9'
connection_to_canvas.p(0): CreateWire failed: failed,-14,no such module as 'M12'
connection_to_canvas.p(0): CreateWire failed: failed,-14,no such module as 'M12'
connection_to_canvas.p(0): CreateWire failed: failed,-14,no such module as 'M9'
I also attached my up_scaled system awd file for reference (redesignexample_upscale.awd).
Thanks,
Sharon.
7:34am
When working with layouts using Matlab scripts there is no information created to locate the module when loaded into Designer.
You need to manually enter values in your script for uccInfo for any new module added if you need it to load properly in Designer.
M.uccInfo.x = horizontal location on the Designer canvas (in canvas units) * 9.6
M.uccInfo.y = vertical location on the Designer canvas (in canvas units) * 9.6
M.uccInfo.height = module block height in canvas units * 9.6
M.uccInfo.width = module block height in canvas units * 9.6
Example:
For the ABS module:
block height = 6 * 9.6 = 57.6
block width = 7 * 9.6 = 67.2