- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I was hoping someone could help me out with this one. I've searched this forum and some others and would just like to find some information on how to extract the insert point coordinate from a block reference inside the active drawing. I have code that will select the blocks within a window, but now I need to get each block and extract it's insertion point. Just for reference, here's my code so far:
' Create a selection set filter for blocks
Dim bgaFilter(0) As DatabaseServices.TypedValue
New DatabaseServices.TypedValue(DatabaseServices.DxfCode.Start, "INSERT")
Dim bgaSSFilter As New EditorInput.SelectionFilter(bgaFilter)
' Select all of the ballpads blocks using a window
myPSR = myEd.SelectWindow(ssWindowPnt1, ssWindowPnt2, bgaSSFilter)
myTransMan = myDWG.TransactionManager
myTrans = myTransMan.StartTransaction
If Not IsNothing(myPSR.Value) Then
bgaSelectionSet = myPSR.Value
bgaObjIDs = New DatabaseServices.ObjectIdCollection(bgaSelectionSet.GetObjectIds)
For Each bgaObjID In bgaObjIDs
myEnt = bgaObjID.GetObject(OpenMode.ForRead)
I'm still learning, so my code above might not be right (if not, feel free to correct). I also think my downfall is not knowing which objects have what modifiers (like myPSR.Value. Value is on the list of things to get from myPSR). Is there a place that has lists of these for reference? I read somewhere a block reference has ".Location" or ".Position", but I cannot find it, probably because I couldn't get my block entity to be the right kind of object.
Anyway, I appreciate your help.
Thanks,
Mark
Solved! Go to Solution.