I have a dll in VB, where do I get access to AppRot (ArcGis 10):Dim pAppRoot As AppROTSet pAppRoot = New AppROTNow when I call the DLL from VBA, it works great.If I call the DLL from a separate application for C + +, then pAppRot is Nothing. In Previous versions Of ArcGis everything is working fine. How can I fix it?
If m_appROT.Count > 0 Then For q = 0 To m_appROT.Count - 1 'If TypeOf m_appROT.Item(i) Is IGxApplication Then ' ArcCatalog running If TypeOf m_appROT.Item(q) Is IMxApplication Then ' ArcMap running If m_appROT.Item(q).Visible = True Then If m_appROT.Item(q).Document.Title = lblConnectedTo.Text Then pApp = m_appROT.Item(q) ' The session originally used. End If End If End If Next q End If
Do you have a Count?pAppRoot.count is?I usually do this:If m_appROT.Count > 0 Then For q = 0 To m_appROT.Count - 1 'If TypeOf m_appROT.Item(i) Is IGxApplication Then ' ArcCatalog running If TypeOf m_appROT.Item(q) Is IMxApplication Then ' ArcMap running If m_appROT.Item(q).Visible = True Then If m_appROT.Item(q).Document.Title = lblConnectedTo.Text Then pApp = m_appROT.Item(q) ' The session originally used. End If End If End If Next q End If
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.