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?
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.