AutoCAD 2010/2011/2012

AutoCAD 2010/2011/2012

Reply
Valued Contributor
62 Posts
0 Kudos
Registered: ‎11-21-2006
Post 1 of 5
Accepted Solution

Xreference Layers and Visretain when xref Unloaded

461 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*
24,312 Posts
1,605 Kudos
Registered: ‎11-06-2003
Post 2 of 5

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
62 Posts
0 Kudos
Registered: ‎11-21-2006
Post 3 of 5

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
62 Posts
0 Kudos
Registered: ‎11-21-2006
Post 4 of 5

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
62 Posts
0 Kudos
Registered: ‎11-21-2006
Post 5 of 5

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
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!