Message 1 of 3
Explode block - Input Error
Not applicable
03-26-2008
10:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am getting an Invalid Input error as attached. I am trying to loop
through all the blocks in a drawing, and explode to find the layers of all
items in the block.
There are approx. 860 instances of approx. 450 blocks. I have tried
objectname and objectid but they don't help isolate the problem. I tried
Insertionpoint but that is not a property of entityset.Item(i)
/snip of code
intDxfCode(0) = 0
varDxfValue(0) = "INSERT"
'set entity name DXF code to match block name
intDxfCode(1) = 2
varDxfValue(1) = oBlock.Name
Set entityset = ThisDrawing.SelectionSets.Add("SS1")
entityset.Clear
'get all instances of block name in the drawing
entityset.Select acSelectionSetAll, , , intDxfCode, varDxfValue
if entityset.count > 0 then
for i = 0 to entityset.count - 1
explodedobjects = entityset.Item(i).Explode
entityset.Item(i).Delete
next
end if
/end code snip
I am filtering my list to exclude xrefs, layouts, and block names that have
"*" in them, like *U123.
I need to know why the block won't explode but to do that I have to find
which block and where it is.
through all the blocks in a drawing, and explode to find the layers of all
items in the block.
There are approx. 860 instances of approx. 450 blocks. I have tried
objectname and objectid but they don't help isolate the problem. I tried
Insertionpoint but that is not a property of entityset.Item(i)
/snip of code
intDxfCode(0) = 0
varDxfValue(0) = "INSERT"
'set entity name DXF code to match block name
intDxfCode(1) = 2
varDxfValue(1) = oBlock.Name
Set entityset = ThisDrawing.SelectionSets.Add("SS1")
entityset.Clear
'get all instances of block name in the drawing
entityset.Select acSelectionSetAll, , , intDxfCode, varDxfValue
if entityset.count > 0 then
for i = 0 to entityset.count - 1
explodedobjects = entityset.Item(i).Explode
entityset.Item(i).Delete
next
end if
/end code snip
I am filtering my list to exclude xrefs, layouts, and block names that have
"*" in them, like *U123.
I need to know why the block won't explode but to do that I have to find
which block and where it is.