ArcGIS Pro二次开发获得符号库的符号
1 string customStyleToAdd = @"F:\2020book\toolforpro\MyProject3\ed-fh.stylx"; 2 //AsyncMethod(customStyleToAdd); 3 4 5 StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(x => x.Path == customStyleToAdd); 6 IList<SymbolStyleItem> PolygonSymbol = null; 7 Task ptask = QueuedTask.Run(() => 8 { 9 PolygonSymbol = style.SearchSymbols(StyleItemType.PolygonSymbol, ""); 10 }); 11 ptask.Wait(); 12 foreach (SymbolStyleItem pSymbol in PolygonSymbol) 13 { 14 MessageBox.Show(pSymbol.Name); 15 16 }