Jump to content

Attachment to Overlay


zitronet

Recommended Posts

I have AutoCAD drawings that have xrefs attached as an attachment. I would like to change it to Overlay using a lisp routine. Does anyone know of a command I can insert into a lisp routine to change the attachment type of attached xrefs from Attachment to Overlay?

 

Thanks in advance for you help.

Link to comment
Share on other sites

Welcome to CADTutor!

 

Perhaps there's a more effective way of accomplishing this, but I know you can use the vla-AttachExternalReference Method, and specify the bOverlay Parameter as :vlax-True.

 

From the Developer Documentation:

 

 

AttachExternalReference Method

 

Attaches an external reference (xref) to the drawing.

 

 

Signature

RetVal = object.AttachExternalReference (PathName, Name, InsertionPoint, XScale, YScale, ZScale, Rotation, bOverlay [, Password])

 

Object

ModelSpace Collection, PaperSpace Collection, Block

The objects this method applies to.

 

PathName

String; input-only

The full path and file name of the drawing to be referenced.

 

Name

String; input-only

The name for the xref to be created.

 

InsertionPoint

Variant (three-element array of Doubles); input-only

The 3D WCS coodinates specifying the point at which an ExternalReference instance is inserted into the drawing. The insertion point in the current drawing is aligned with the point defined by the BASE system variable in the referenced file.

 

XScale

Double; input-only

The X scaling factor for the xref instance.

 

YScale

Double; input-only

The Y scaling factor for the xref instance.

 

ZScale

Double; input-only

The Z scaling factor for the xref instance.

 

Rotation

Double; input-only

The rotation angle for the xref instance. This angle is specified in radians.

 

bOverlay

Boolean; input-only

TRUE: The xref instance is an overlay.

FALSE: The xref instance is an attachment.

 

Password

Variant; input-only; optional

 

RetVal

ExternalReference object

 

The newly created ExternalReference object.

 

Remarks

Like Block objects, attached ExternalReference objects can be nested. If another person is editing the drawing to be referenced, the drawing attached is based on the most recently saved version.

 

If the referenced file is missing or corrupt, its data is not displayed in the current drawing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...