Using profiles from the API

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I apparently don't know how to use SaveGlobalProfile and ProfileGlobalSelection.
I have at least one panadapter with a slice, and make some modifications, and then do "theRadio.SaveGlobalProfile("testing");".
I then disconnect and reconnect the radio and do "theRadio.ProfileGlobalSelection = "testing";".
The hope is that this will restore the characteristics from the "testing" profile.
I would expect the ProfileGlobalList to contain my profile, but it contains nothing.  Apparently I've missed something obvious here, but I can't figure out what.
Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 32 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Mark - W3II

Mark - W3II

  • 120 Posts
  • 31 Reply Likes
When  you call Connect on the Radio object the API requests the status of many items, profile lists being among them. The Radio has a Property changed event you need to listen to. This will notify you when the profile list you desire has been loaded / changed.
In this case look for the property name "ProfileGlobalList". Once you see this property notification you can then use the ProfileGlobalList to access existing profiles.

Now that you know how to access the list I have to warn you that SmartSDR 1.4.X and earlier has an issue where selecting a global profile from an API application will / may corrupt the SmartSDR UI. This is a know issue in their bug tracking system which has been fixed in the next release of SmartSDR.

Setting TX Profiles works without any issues.


73,
Mark 
Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 32 Posts
  • 0 Reply Likes

Photo of Jim Shaffer (KE5AL)

Jim Shaffer (KE5AL)

  • 32 Posts
  • 0 Reply Likes
Don't know if my reply made it.  Thanks Mark, that worked.  I should have realized that.