您好,我正在测试这段代码。如何将WMS添加到Autocad?我可以添加连接,但我想知道如何将其添加到“显示管理器”中的图层并添加到地图中。
https://forums.autodesk.com/t5/net/using-wms-fdo-for-map-laoding-in-aud-modal-space/td-p/4423709
-
- Dim manager As IConnectionManager = FeatureAccessManager.GetConnectionManager()
- Using connection As IConnection = manager.CreateConnection("OSGeo.WMS.4.2")
- Dim IConnectionPropertyDictionaryprops = connection.ConnectionInfo.ConnectionProperties
- IConnectionPropertyDictionaryprops.SetProperty("FeatureServer", "https://SERVER")
- IConnectionPropertyDictionaryprops.SetProperty("Username", "USERNAME")
- IConnectionPropertyDictionaryprops.SetProperty("Password", "PASSWORD")
- Try
- connection.Open()
- Catch ex As Autodesk.AutoCAD.Runtime.Exception
- ed.WriteMessage(ex.Message.ToString())
- End Try
- End Using
关于
西格斯特
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |