• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Contributor
    jamkhp
    Posts: 24
    Registered: ‎05-19-2011
    Accepted Solution

    Drawing Saveas is not given expected results

    292 Views, 8 Replies
    06-01-2011 07:54 AM

    Hi all,

    Here is a code snippet which is helping me save the file in acad 2000 format, it is working fine, I am facing one minor problem with this, the arrowheads of the dimension are not visible, but the dimensionstyle shows that the arrow head exists, and the whole dimension is one entity( I mean it is not exploded). any suggestions so that I can improve on this, I want the dwg to be saved in 2000 format only, whilst I am constructing it in 2011 through VB.Net.

    ' ' Start Code

    Dim acDoc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
    Dim strDWGName As String = saveFileDia.FileName   ' Name and path extracted from SavefileDialog box
    acDoc.Database.SaveAs(strDWGName, True, DwgVersion.AC1015, acDoc.Database.SecurityParameters)

    ' ' Ending of the Code

     

    this is what I see in the drawing

    ** I tried changing the background color just to see that arrow has changed its color, but it is not the case

     

    saveasError.jpg

     

    But on the same file if I do a dxfout(), then it is coming good I dont see this condition.

     

    Please help me.

     

     

    Please use plain text.
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    Re: Drawing Saveas is not given expected results

    06-01-2011 08:01 AM in reply to: jamkhp

    Your problem is not the file format. but that annotative dimentioning isn't supported in 2000.

     

    ---------------------------



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.
    Contributor
    jamkhp
    Posts: 24
    Registered: ‎05-19-2011

    Re: Drawing Saveas is not given expected results

    06-01-2011 08:16 AM in reply to: arcticad

    Hey that was quick,

    is this what I need to add

    acAliDim.Annotative= AnnotativeStates.False

    or

    acAliDim.Annotative= AnnotativeStates.Notapplicable

     

    ?

    Sorry I cant run autocad out of my Company so I am asking this question since you are available, please bear with, in fact I should have trid myself.

     

    Thanks for the quickest help I have ever got. 

    Please use plain text.
    Contributor
    jamkhp
    Posts: 24
    Registered: ‎05-19-2011

    Re: Drawing Saveas is not given expected results

    06-01-2011 09:10 AM in reply to: jamkhp

    Hi some how I got acces to autocad,

    Sorry to say this I am not able to do it, I tried by the methods that I had hit me,

    it is not working,

    please help me.

     

    Please use plain text.
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    Re: Drawing Saveas is not given expected results

    06-01-2011 09:40 AM in reply to: jamkhp

    Post your Autocad file, the original and the saved as

     

    Thanks

    ---------------------------



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.
    Contributor
    jamkhp
    Posts: 24
    Registered: ‎05-19-2011

    Re: Drawing Saveas is not given expected results

    06-01-2011 10:08 AM in reply to: arcticad
    Please use plain text.
    Contributor
    jamkhp
    Posts: 24
    Registered: ‎05-19-2011

    Re: Drawing Saveas is not given expected results

    06-04-2011 03:37 AM in reply to: jamkhp

    Hi I have posted my files,

    any success with that?

     

    Please use plain text.
    Contributor
    jamkhp
    Posts: 24
    Registered: ‎05-19-2011

    Re: Drawing Saveas is not given expected results

    06-04-2011 03:38 AM in reply to: arcticad

    hi please reply...

    Please use plain text.
    *Expert Elite*
    arcticad
    Posts: 1,250
    Registered: ‎06-21-2004

    Re: Drawing Saveas is not given expected results

    06-06-2011 06:49 AM in reply to: jamkhp


    The error you are seeing is not because of anything code related.
    It has to do with the drawing failing validation.
    This is a known problem. I've seen it since 2008

    When a drawing is opened in AutoCAD it checks to see if the file was
    last saved with an autodesk product.

    The data required for this was not supported in 2000/2004.
    The file should open just fine if you were using AutoCAD 2004.

    However when you use a newer version then it will require the file to be recovered.

    If you notice you can resave the file as a 2010 from the 2000 file in code and there are no issues with the file.

    The only fix is to resave the file into the current version.
    

    ---------------------------



    “We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
    Please use plain text.