hello.
i use acad2006
I have a part named part1.dwg that contain some enities that are grouped in
the group test now i want
make a insertblock and explode it but i want mantain the previos group.
If i make this operation by line command without automatik explode and that
explode by command all is ok.
But if i make the same operation by program don't work.
----------------------------------------------------
First version:
Try
p1(0) = 0
p1(1) = 0
p1(2) = 0
BlockRef = AcInt.AcadDoc.ModelSpace.InsertBlock(p1, "c:\part1.dwg"1, 1, 0.0)
Block = AcInt.AcadDoc.Blocks.Item(BlockRef.Name)
BlockRef.Explode()
BlockRef.Delete()
Block.Delete()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
AcInt.AcadApp.ZoomExtents()
BlockRef = Nothing
Block = Nothing
End Try
'---------------------------
second version
This version have work until acad2005
now don't work
'----------------------------------
Try
p1(0) = 0
p1(1) = 0
p1(2) = 0
BlockRef = AcInt.AcadDoc.ModelSpace.InsertBlock(p1, "c:\part1.dwg",1, 1,
0.0)
Block = AcInt.AcadDoc.Blocks.Item(BlockRef.Name)
J = -1
ReDim CollObj(Block.Count - 1)
For Each Obj In Block
J += 1
CollObj(J) = Obj
Next Obj
RetVal = AcInt.AcadDoc.CopyObjects(CollObj, AcInt.AcadDoc.ModelSpace, )
For J = 0 To UBound(RetVal)
Obj = RetVal(J)
Obj.ScaleEntity(p1, scalex)
Obj.Move(p1, insertionpnt)
Obj.Rotate(insertionpnt, degrad(rot))
Next
BlockRef.Delete()
Block.Delete()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
AcInt.AcadApp.ZoomExtents()
BlockRef = Nothing
Block = Nothing
RetVal = Nothing
End Try
------------------------------------------------------
is possible changed the ownerid of the enities in the blockdefinition and
put modelspace?
Now both the solution dont work.
Some help?