0

i want to display my custom 3d symbol instead of ArcGIS sphere, cylinder etc. For scenesymbol marker, i tried to use ModelSceneSymbol but it wasn't much help because it doesn't have any way to import it and i had to copy all the code required nearly 5 class files into the program and still there are a lot of errors where I still needed 1 more file, so now there are 2 more ways

  1. Host a 3D model on the web instead of ArcGIS
  2. Use something other than ModelSceneSymbol

The issue with 1st one is that i tried putting the file in Google drive and calling it but still it wasn't displaying in scene

The 2nd one i don't know if there is another way for displaying a scene

Who
  • 1
  • 1
  • What do you mean by "nearly 5 class files" ? If you have a file with a 3D model, the ModelSceneSymbol is the way to go. Just point its source to that file (you don't need to host it on a web server - a file uri is fine too) – dotMorten May 31 '22 at 18:31

1 Answers1

0

A 3D symbol can be made with a single line of code pointing to your model on disk:

var symbol = await ModelSceneSymbol.CreateAsync(new Uri(@"c:\3dmodels\mymodel.fbx"));

dotMorten
  • 1,953
  • 1
  • 14
  • 10
  • Hi mr.morten it doesn't work that way, it keeps showing syntax error because the way to create it is ModelSceneSymbol ms2= await ModelSceneSymbol.CreateAsync(Uri, size); if i use your declaration i get a syntax error btw this is for a xamarin app so i don't think a system path can be used like in wpf – Who Jun 04 '22 at 17:09
  • I know this because i read the documentation for declaration https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Symbology.ModelSceneSymbol.html – Who Jun 04 '22 at 17:17
  • Sorry I forgot you have to use CreateAsync. But same thing applies for Xamarin - you can still use Uri to a local file path - the path will of course not be C:\ but something else. – dotMorten Jun 05 '22 at 18:51