Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

Adding an element to a named group that is in an attachment, Error Number -2147219301, Error Description: Far reference

$
0
0

I am trying to write what I thought was a simple program to add elements to a named group if they meet the criteria I designated. However when I go to add an element that is in an attachment to a named group I get an error (Error Number -2147219301, Error Description: Far reference). This is something that works without issue when done manually using the dialog box and also works using similar code within the activemodelreference. I hope someone has an idea of why this does not work or knows how to get around this error. Thanks in advance.

Dim oAttachment As Attachment
Dim oAttachments As Attachments

Dim oATTACHMENT_EE As ElementEnumerator

Set oAttachments = ActiveModelReference.Attachments

For Each oAttachment In oAttachments

     Set oATTACHMENT_EE = oAttachment.GraphicalElementCache.Scan

     Do While oATTACHMENT_EE.MoveNext
             Selection_NG.AddMember oATTACHMENT_EE.Current
     Loop

Next


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>