필터 지우기
필터 지우기

Warning: Error using Simulink.SLXPart (line 74)

조회 수: 30 (최근 30일)
Tet Kong Brian Chia
Tet Kong Brian Chia 2019년 9월 17일
편집: Walter Roberson 2024년 7월 12일 20:07
Hello,
recently, i keep getting this warning whenever i run or save my simulink model:
Warning: Error using Simulink.SLXPart (line 74)
Part name must start with a slash
Error in slxPackager/partDefResources>i_partinfo
Error in slxPackager/partDefResources>i_save
Error in Simulink.SLXPartHandler/pExecute (line 105)
feval(cb,packager);
Error in Simulink.SLXPartHandler/doSave (line 66)
pExecute(obj(i),packager,cb,'Save',logger);
Error in Simulink.SLXPartHandlerRegistrar/executeSaveCallbacks (line 94)
doSave(obj.getHandlers,packager);
Error in slxPackager/executeSaveCallbacks
Error in slxPackager/save
Error in slprivate (line 11)
[varargout{1:nargout}] = feval(function_name, varargin{1:end});
Error in SimulinkStudio.callbacks.saveCB (line 14)
SLM3I.saveBlockDiagram( cbinfo.model.Handle );
Error in SLStudio.ToolBars
Please give me some tipps on how to solve this issue, thanks :)
Brian
  댓글 수: 2
Sobhi Zeidan
Sobhi Zeidan 2019년 12월 4일
Hello,
DId you ever get this issue resolved?
Regards,
Sobhi
Tet Kong Brian Chia
Tet Kong Brian Chia 2019년 12월 8일
Hello Sobhi,
unfortunately no, but since it is only warning and does not disturb the simulation, i just ignore it. Thanks for your question.
Brian

댓글을 달려면 로그인하십시오.

채택된 답변

Himani Raina
Himani Raina 2020년 1월 29일
This typically happens when there are unresolved image annotations in the model. When copying an image from the clipboard as an annotation into the model, Windows may not preserve the right path name. So when copying from the clipboard the Windows path may point to a temp folder or a URL if it is from your browser. The result is an annotation with a missing image and hence you get this warning when you try to save the model. The problem should be resolved by using the insert image dialog box for your annotations.
  댓글 수: 4
Andrew De Bruin
Andrew De Bruin 2021년 1월 13일
편집: Andrew De Bruin 2021년 1월 13일
Is there a method to easily identify these unresolved image annotations? The warning does not provide a link/path to the offending image.
Firas
Firas 2024년 3월 6일
Thank you very much. After 4 years I went through my model block by block and I found two image annotations that I deleted and resolved this issue.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jochen Lenz
Jochen Lenz 2024년 7월 12일 18:40
I also just had this problem - and it is really annoying. Here is a proposal about how to find such broken annotations, where "bdroot" is the actual Simulink model:
clc
hAnno = find_system( bdroot, ...
'FindAll', 'on', ...
'Type', 'annotation' ...
);
for n = 1 : length(hAnno)
disp('-----------------------------------------');
disp( [' > ' get_param(hAnno(n), 'Parent') ':'] );
disp( get_param(hAnno(n), 'Name') );
end
In the resulting list on the commandscreen, you might see XML-like content, beginning with
<!DOCTYPE HTML PUBLIC ...>
When you see content like this, then it's ok:
<img src="[$unpackedFolder]/simulink/resources/mwimg_ ... -8fae7932e4e5.tif"/>
When you however see something like this, then it might be the cause of your problem:
<img src="D:\users\ ... /mwimg_ ... -2160b69c8c0c.png" />
The, use the Parent of the annotation to navigate to the Simulink SubSystem.

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by