주요 콘텐츠

gcbp

현재 블록의 Simulink.BlockPath 객체 가져오기

설명

path = gcbp는 현재 시스템에서 현재 블록의 Simulink.BlockPath 객체를 반환합니다. 다음과 같은 블록을 현재 블록이라고 합니다.

  • 가장 최근에 클릭한 블록

  • 모델을 연 후 마지막으로 불러온 블록

반환되는 Simulink.BlockPath 객체는 모델 계층 구조의 상황에 따라 다를 수 있습니다.

예제

예제

모두 축소

MultiCounter 모델을 엽니다.

openExample("simulink_features/ComponentBasedModelingUsingModelReferenceExample")

모델 계층 구조에서 블록 하나를 선택합니다. 예를 들어, LimitedCounterCounterA 인스턴스에서 Unit Delay 블록을 선택합니다.

MATLAB® 명령 창에서 gcbp 함수를 사용합니다.

path = gcbp
path = 

  Simulink.BlockPath
  Package: Simulink

  Block Path:
    MultiCounter/CounterA
      LimitedCounter/Unit Delay

  Use the getBlock method to access block path strings from this object.

  Methods

버전 내역

R2019a에 개발됨

참고 항목

객체

함수