AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Valued Contributor
Martin60
Posts: 62
Registered: ‎11-21-2006
Message 1 of 5 (445 Views)
Accepted Solution

Xreference Layers and Visretain when xref Unloaded

445 Views, 4 Replies
11-28-2012 02:25 PM

‘Drawing A’ has ‘Drawing B’ Xref’d into it.

 

The layers for Xref’d ‘Drawing B’ have been manipulated (colours and visibility) in ‘Drawing A’.

 

‘Drawing B’ is unloaded from ‘Drawing A’, and ‘Drawing A’ is then saved and exited from.

 

When ‘Drawing A’ is reopened, all of the manipulated layers from ‘Drawing B’ have defaulted to their ‘Drawing B’ layer state.

 

Note: The layer settings are retained in AutoCAD 2010 for this scenario.

 

Are there any other settings that may effect this?

It has been determined that this problem is due to our .net code migrated from AutoCAD 2010.

The function deltes empty layers from the symbol table (i.e. purge) and in 2012 is able to do so with xref layers.

 

Solution was to add the following test

 If Not acSymTblRec.IsDependent Then
Try
acSymTblRec.Erase(True)
Catch Ex As Autodesk.AutoCAD.Runtime.Exception
MessageBox.Show("Error:" & vbLf & Ex.Message, fcn)
End Try
End If

 

Thanks to Autodesk for their assitance in resolving this.

 

Regards

Martin

 

 

 

*Expert Elite*
pendean
Posts: 23,640
Registered: ‎11-06-2003
Message 2 of 5 (411 Views)

Re: Xreference Layers and Visretain when xref Unloaded

11-30-2012 06:24 AM in reply to: Martin60

... and VISRETAIN is set to what?

May I ask the purpose of unloading the XREF?

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Valued Contributor
Martin60
Posts: 62
Registered: ‎11-21-2006
Message 3 of 5 (405 Views)

Re: Xreference Layers and Visretain when xref Unloaded

11-30-2012 12:26 PM in reply to: pendean

VISRETAIN = 1

we are evolved in plant design and can have over 400 xreferences inn a CAD file.

 

Users like to unload xreferences at times for visual and performance gains but retain the layer settings.

when using AutoCAD 2010 this was not a problem.

 

Valued Contributor
Martin60
Posts: 62
Registered: ‎11-21-2006
Message 4 of 5 (394 Views)

Re: Xreference Layers and Visretain when xref Unloaded

12-02-2012 05:57 PM in reply to: Martin60

This problem does not occur in AutoCAD 2013

(or AutoCAD 2010, as previously stated).

Valued Contributor
Martin60
Posts: 62
Registered: ‎11-21-2006
Message 5 of 5 (368 Views)

Re: Xreference Layers and Visretain when xref Unloaded

12-16-2012 06:50 PM in reply to: Martin60

It has been determined that this problem is due to our .net code migrated from AutoCAD 2010.

The function deltes empty layers from the symbol table (i.e. purge) and in 2012 is able to do so with xref layers.

 

Solution was to add the following test

  If Not acSymTblRec.IsDependent Then
     	Try
      	acSymTblRec.Erase(True)
      Catch Ex As Autodesk.AutoCAD.Runtime.Exception
             MessageBox.Show("Error:" & vbLf & Ex.Message, fcn)
      End Try
   End If

 

Thanks to Autodesk for their assitance in resolving this.

 

Regards

Martin

 

 

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.