VBA code to export block to .bmp issue with visual style

Hi.

I found the attached code here.

the code works very good apart from the fact that the .bmp show the block in "2dWireframe" visual style even though the drawing is set to "Modeling" visual style.

can someone help me make this code create the .bmp in "Modeling" visual style?

PVC REDUCING BUSHING 63x32 SW_3d.bmp is the resault in "2dWireframe" visual style.

Table_Preview.dwg is a sample drawing.

I need it in modeling…

thanks,

aridzv.

Comments

  • aridzv
    edited April 15

    found the solution in "pngout" command this way:

    ThisDrawing.SendCommand ("FILEDIA" & vbCr & 0 & vbCr) '' filedia to "0" to disable the file save window
    ThisDrawing.SendCommand ("PNGOUT" & vbCr & fileName & vbCr)'' run pngout with full path & file name
    ThisDrawing.SendCommand ("FILEDIA" & vbCr & 1 & vbCr)''restore filedia to "1"

    apparently pngout get what ever the drawing show…