AutoCAD Mechanical Forum
Welcome to Autodesk’s AutoCAD Mechanical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Mechanical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Block insertion macro crash

1 REPLY 1
Reply
Message 1 of 2
christophe.buffet
206 Views, 1 Reply

Block insertion macro crash

I was executing a macro and it endend with an access violation :
Sub insert_block()


Dim insertionPnt(0 To 2) As Double
Dim blockRefObj As AcadBlockReference

insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "c:\Cart_Sup.dwg", 1#, 1#, 1#, 0)


End Sub

It seems to crash when it runs the line : Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "c:\Cart_Sup.dwg", 1#, 1#, 1#, 0)

We can open the DWG file or insert it manually in autocad.
The macro runs perfectly in earlier version (ie Autocad 2004 or 2005)

Do you have an idea of the problem?
Thank you
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: christophe.buffet

This is a regression in AutoCAD Mechanical 2006 that was recently reported.
We are investigating the problem but at this time we don't have a solution
or a workaround to the problem.

--
Mike Dickason
Developer
Manufacturing Solutions Division
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost