Recovery drawing message

Recovery drawing message

danijel.radenkovic
Collaborator Collaborator
1,212 Views
3 Replies
Message 1 of 4

Recovery drawing message

danijel.radenkovic
Collaborator
Collaborator

Hello to all,

According to my previous topic: https://forums.autodesk.com/t5/visual-basic-customization/rename-a-block-amp-purge-the-drawing/m-p/7...

I have made an application which renames block name in the drawing, then make purge and save the drawing.

The problem happens when I try to open the drawing after modification. I am getting the error from the image. I have tested the same application on few other computers and there is no message after opening a drawing. The message is just on my computer.

Do I have something different in AutoCAD settings?

Can you tell me how to avoid a problem of showing the message?

recoverz.PNG

Here is a piece of code:

                For Each objBlock In acDoc.Blocks
                    If objBlock.Name = txtBlockToRename.Text Then
                        objBlock.Name = txtNewBlockName.Text
                        Exit For
                    End If
                Next

                With acDoc
                    .PurgeAll()
                    .Save()
                    .Close()
                End With

Best regards,

Danijel

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
0 Likes
1,213 Views
3 Replies
Replies (3)
Message 2 of 4

sieclaprzemyslaw
Contributor
Contributor

Hello!

Did you try to use save option during closing? Close method has optional SaveChanges value. Try this:

 

With acDoc
   .PurgeAll()
   .Close(True)
End With

 

I saw in previous thread that you have it - but macro was not working in that time. Maybe you should try it again with working macro.

 

 

0 Likes
Message 3 of 4

danijel.radenkovic
Collaborator
Collaborator

@sieclaprzemyslaw wrote:

Hello!

Did you try to use save option during closing? Close method has optional SaveChanges value. Try this:

 

With acDoc
   .PurgeAll()
   .Close(True)
End With

 

I saw in previous thread that you have it - but macro was not working in that time. Maybe you should try it again with working macro.

 

 


Yes, I have tried. Still the same, showing the message.

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
0 Likes
Message 4 of 4

danijel.radenkovic
Collaborator
Collaborator

Any new idea why the error happens?

Inventor 2018/Windows 10 x64
If this information was helpful, please consider marking it as an Accepted Solution by using the Accept as Solution. Kudos are also gladly accepted.
0 Likes