Block Insert in 2007

Block Insert in 2007

Anonymous
Not applicable
280 Views
4 Replies
Message 1 of 5

Block Insert in 2007

Anonymous
Not applicable
Hi all

I am having an issue with my VB code in AutoCAD 2007. I have a routine which generates a template dynamically, depending on settings specified by the user. The title block, revision block etc are inserted into paperspace.

The problem I am having is with the title block. It contains an OLE object which is our company logo. When the title block is inserted via the vb code, the logo is not inserted. There is no evidence that it has ever been there, even when I explode the block. However, if I delete the title block and then purge it and insert it using the AutoCAD toolbar, the logo appears.

Has anyone else come across this and if so, have you found a way around it?

Any help would be greatly appreciated.
Many thanks,
Laura.
0 Likes
281 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
It would help if you could post a code snippet of your routine.
Phil Custer, P.E.
Custer Services, Inc.
custer@landfillgas.com
0 Likes
Message 3 of 5

Anonymous
Not applicable
I insert the block using the following code:

dblTitleBlkPos(0 to 2) as Double
Dim OBlock as AcadBlockReference

dblTitleBlkPos(0)= 180: dblTitleBlkPos(1)=10: dblTitleBlkPos(2)=0
set OBlock = ThisDrawing.PaperSpace.InsertBlock(dblTitleBlkPos, "title-block.dwg", 1#, 1#, 1#, 0)

This is the exact same code I used for 2006 and it worked fine.

Thanks for your help,
Laura.
0 Likes
Message 4 of 5

Anonymous
Not applicable
Does anyone have any ideas for this? I am still having the same problem and getting the users to delete the block then purge it and have to reinsert it every time they want to create a new drawing is far from ideal.

Many thanks again,
Laura.
0 Likes
Message 5 of 5

Anonymous
Not applicable
It is obviously a bug in ActiveX. So you can try rewriting your code in LISP
or .NET.

Also, report the bug here:
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1109794


--
R. Robert Bell


wrote in message news:5317396@discussion.autodesk.com...
Does anyone have any ideas for this? I am still having the same problem and
getting the users to delete the block then purge it and have to reinsert it
every time they want to create a new drawing is far from ideal.

Many thanks again,
Laura.
0 Likes