Developer Portal Community

    We are still working on migrating to the new Bosch Connected Industry Online Portal. Stay tuned! Click here for the latest updates.

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    How to call export template of base class?

    How to call export template of base class?

    MarvinW
    Long-established Member

    Hello,

    I am currently writing an object that is derived from another object because it is a more specialized version for a specific base station. I added a new ParCfgXyz to my new object and parameters in the OOD. I use the base object as BaseRevId inside the OOD and it nicely pulls in all the content into OES next to the new content of my derived object.

    Now my problem is with the export templates. I need to add a StartupParams.otd for my derived object so I can assign the new parameters. But how can I gracefully call the StartupParams.otd from my base object?

    <%T= ..\..\..\..\..\Std\Objects\BaseObjectName\V1.0\Export\StartupParams.otd %>

    This works but it is not very pretty and it relies on both derived and base object having a somewhat exact relative path to each other. Maybe there is a more elegant way?

    The derived object does not define a new extension so OES automatically executes the extension export template from the base object, which is nice. In the case of the StartupParams, because the derived objects specifies its own StartupParams, the base object's version is considered overriden by OES. Is my understanding of this process correct?

    1 REPLY 1

    nexidator
    Community Moderator
    Community Moderator

    There is not way to find out the template path of the base object. You will have to copy the content of the base export template to the template of your derived object. I know this means you have to update your own object if there are relevant changes in the base object, but I don't see any other possibility.

    Your understanding of object derivation is correct. Just some more hints:

    • The elements in the UseAs and Templates section replace (override) the inherited ones (like you said).
    • All elements in the Content section are usually aggregated, but with one exception: If a variable or type is referenced by a UseAs element (e.g. the Extension), and this UseAs is overridden in the derived object, the variable provided by the base object is ignored, so only the Extension from the derived OOD file remains in the project. In case of the Unit and Extension, also the type definition from the base object is ignored in case it is instance specific.
    • That means if you don't provide a <UseAs><Extension> in the derived object, the Extension variable and type definition from the base object are created (just as any other content from the base object).
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist