progeCAD support, tips and troubleshooting forum. progeCAD works very similar to some versions of AutoCAD. Moderated.

Moderators: caddit, Moderators

#2009 by jouni
Thu May 02, 2013 8:21 am
Hi

Progecad 2013 and VBA 6.4 problem with deleting the block definition.
This same code works fine with Progecad 2010 and VBA 6.3. but causes error message. Object browser tells that there is a member "Delete" in Class "Block" in Library "Intellicad".
Here is the sample code:

Dim myDoc as Intellicad.Document
Dim oBlock As IntelliCAD.Block
Set myDoc = Application.ActiveDocument
---
code for deleting all the block inserts from drawing
this works and need to be done before deleting the block definition
---

..check if block exists...then

Set oBlock = myDoc.Blocks.Item("Blockname")
oBlock.Delete<--- this causes Run-time error '445':Object doesn't support this action

I have managed to empty the block deleting the drawing objects and attributes and still there is that empty block definition left.
Is there a solution or is this a bug in VBA?
Last edited by jouni on Mon May 06, 2013 11:13 am, edited 1 time in total.
#2010 by jouni
Mon May 06, 2013 11:05 am
Progesoft fixed this issue by releasing a new beta version. A couple of other minor bugs conserning the blocks and attributes were also fixed.