Using a Variable in WP Download Manger Shortcode

sorry if this isn’t allowed here as it is related to WordPress but it is PHP related.

I am using a wordpress plugin called Pods – Custom Content Types and Fields and WP Download Manager.

In PODs I have created a POD that has a user select from drop down a post from WP Downlods Manger. This is set as resource_link_protected. This is all fine and I can display the Download by using magic tags such as

echo '{@resource_link_protected.ID}'; //DISPLAYS 1554 FOR EXAMPLE

This will display the ID number of the selected download. Works Great! However, I need to uses this value in a shortcode So I use:

$linkid = '{@resource_link_protected.ID}';
echo do_shortcode("[wpdm_package id='$linkid' template='link-template-button']");

This doesn’t work, if I echo $linkid it displays 1554 as per my example above. If I replace $linkid with 1554 in the shortcode, it works and displays a button.

Why when I create a variable ($linkid = '{@resource_link_protected.ID}';) does it work to echo etc. but then doesn’t work inside the shortcode even though $linkid = '1554' would?