The Portal.Names method returns a collection of portal names from the Manage Portals dialog box as strings. Portals can be managed in ArcGIS for AutoCAD through the Add Data window.
Note:
The portal name is first accessed by the default portal name "ArcGIS Online" or "ArcGIS Enterprise". Once you're signed in, the portal name may be the organizational name set by your administrator.
Declaration
public IEnumerable<string> Esri.ArcGISForAutoCAD.Portal.Names()
Parameters
There are no parameters for this method.
Returns
| Type | Description |
|---|---|
IEnumerable<string> | A collection of ArcGIS portal names as strings. |
Remarks on error conditions
This method may throw an exception or return null if there are no portals in the current session.
Example
Print the portal names currently added to ArcGIS for AutoCAD.// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;
// Get the portal names
var portalNames = Esri.ArcGISForAutoCAD.Portal.Names();
// Print the portal names
foreach (var name in portalNames)
{
doc.Editor.WriteMessage("\n" + name);
}
/* Example output
ArcGIS Online
CAD Team Enterprise 11.3
*/
See also
esri_portal_names—An AutoLISP function that gets a list of portal names as strings from managed portals.