Hi all,
I'm trying to select blocks in an open drawing from within VB.NET. I use the following code fragment (myAcadDoc refers to the open document):
--------- START CODE FRAGMENT ---------------
Dim gpCode(1) As Integer, dataValue(1) As Object
gpCode(0) = 0 : dataValue(0) = "INSERT"
gpCode(1) = 2 : dataValue(1) = "BlockName"
ssTitleBlock = myAcadDoc.SelectionSets.Add("isAcadBatch"
ssTitleBlock.Select(acSelectionSetAll, , , gpCode, dataValue)
--------- END CODE FRAGMENT ---------------
This causes an exception to be generated. The problem is that the "dataValue" parameter should be of COM-type "vbVariant + vbArray". However, what is the equivalent .Net type??? Please help...
Best regards,
Jaap Holweg
mailto:J.Holweg@infostrait.nl
I'm trying to select blocks in an open drawing from within VB.NET. I use the following code fragment (myAcadDoc refers to the open document):
--------- START CODE FRAGMENT ---------------
Dim gpCode(1) As Integer, dataValue(1) As Object
gpCode(0) = 0 : dataValue(0) = "INSERT"
gpCode(1) = 2 : dataValue(1) = "BlockName"
ssTitleBlock = myAcadDoc.SelectionSets.Add("isAcadBatch"
ssTitleBlock.Select(acSelectionSetAll, , , gpCode, dataValue)
--------- END CODE FRAGMENT ---------------
This causes an exception to be generated. The problem is that the "dataValue" parameter should be of COM-type "vbVariant + vbArray". However, what is the equivalent .Net type??? Please help...
Best regards,
Jaap Holweg
mailto:J.Holweg@infostrait.nl