Message 1 of 4
Blockreference insertion point in current drawing

Not applicable
01-16-2008
04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone! I'm trying to extract the insertion point of a block in an open drawing. However the insertion point that is returned is the origin of the drawing in which the block was designed. What i'd like to return is something useful like the blockcenter or lowerleft corner of the block in the current drawings coordinate system. My code is:
If TypeOf ent Is AcadBlockReference Then
Set Block = ent
startpuntWCS = Block.insertionpoint
'this is something i've been looking into but it still returns thesame 'values:
startpuntUCS = Thisdrawing.Utility.TranslateCoordinates(startpuntWCS, acWorld, acUCS, False)
x = startpuntUCS(0)
y = startpuntUCS(1)
End If
thnx a bunch you guys
If TypeOf ent Is AcadBlockReference Then
Set Block = ent
startpuntWCS = Block.insertionpoint
'this is something i've been looking into but it still returns thesame 'values:
startpuntUCS = Thisdrawing.Utility.TranslateCoordinates(startpuntWCS, acWorld, acUCS, False)
x = startpuntUCS(0)
y = startpuntUCS(1)
End If
thnx a bunch you guys