Hello,
Welcome to Microsoft Q&A
There is no information about how to launch the 3D Viewer with a selected file in the Launch the default app for a URI document. But you could launch the 3D Viewer app with a selected file by using the method launching the default app for a file.
For example:
- You need to get the selected file by using a
Windows.Storage.StorageFile
object or get the file directly if the file is stored in the locations that your app can access. - Use Launcher.LaunchFileAsync method to open the selected file.
- If 3D Viewer is not the default app which is used to open 3mf file, you could set it with the option Settings > Apps > Default apps > Choose default apps by file type, find .3mf and select 3D Viewer as the default app. Or, you could call the
Windows.System.Launcher.launchFileAsync(IStorageFile, LauncherOptions)
method withLauncherOptions.PreferredApplicationPackageFamilyName
set to the package family name of the app in the Store that you want to recommend. Then, set theLauncherOptions.PreferredApplicationDisplayName
to the name of that app.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.