Visual LISP, AutoLISP and General Customization

Reply
*Wojtynek, Steve
Message 1 of 4 (908 Views)

Detach Unloaded Xrefs Routine

908 Views, 3 Replies
12-01-2003 06:40 AM
It seems some people like to Unload the xrefs they used for five minutes
rather than detaching them when finished. Then the xref gets deleted down
the road... You know.

I could use a routine that will get rid of xrefs that are not needed when
the project is finished. I'm figuring that if the xref was Unloaded at the
time of the final plotting, then it wasn't necessary to produce the plotted
image (which is what our archiving process is all about).

Is this an easy one?
*Mishler, Jeff
Message 2 of 4 (908 Views)

Re: Detach Unloaded Xrefs Routine

12-01-2003 08:00 AM in reply to: *Wojtynek, Steve
Sure, try this....
Warning, it will also detach Xrefs that may just be unresolved, but that
shouldn't be a problem in your case since the final plot has been done....

Jeff

(defun remove-unloaded-xrefs ()
(vlax-for block (vla-get-blocks
(vla-get-activedocument
(vlax-get-acad-object)))
(if (and (= :vlax-true (vla-get-isxref block))
(= 0 (vla-get-count block))
)
(vla-detach block)
)
)
)
(defun c:rux ()
(remove-unloaded-xrefs)
(princ)
)


"Steve Wojtynek" wrote in message
news:9A16C317881C025CFFB97DD1636DA96F@in.WebX.maYIadrTaRb...
> It seems some people like to Unload the xrefs they used for five minutes
> rather than detaching them when finished. Then the xref gets deleted down
> the road... You know.
>
> I could use a routine that will get rid of xrefs that are not needed when
> the project is finished. I'm figuring that if the xref was Unloaded at
the
> time of the final plotting, then it wasn't necessary to produce the
plotted
> image (which is what our archiving process is all about).
>
> Is this an easy one?
>
>
>
>
>
*Poel, Jan van de
Message 3 of 4 (908 Views)

Re: Detach Unloaded Xrefs Routine

12-01-2003 04:15 PM in reply to: *Wojtynek, Steve
Educate your users!
Let them keep their drawings clean, no unused X-refs, get the drawings
purged !!
Eventually use wblock.

From managing point its important that the users do that, think of storage
and backup,
loading time, editing time etc

Example:
received an architectural drawing, size 5.6Mb.
ran a simple purge, size 2.5Mb.
used wblock, size 677Kb. !!
No details were missing in the drawing, loads faster, pans faster etc.

Our drawings rarely grow over 1Mb (construction), as soon as the drawing is
bigger, the user is addressed to clean up.

Jan

"Steve Wojtynek" schreef in bericht
news:9A16C317881C025CFFB97DD1636DA96F@in.WebX.maYIadrTaRb...
> It seems some people like to Unload the xrefs they used for five minutes
> rather than detaching them when finished. Then the xref gets deleted down
> the road... You know.
>
> I could use a routine that will get rid of xrefs that are not needed when
> the project is finished. I'm figuring that if the xref was Unloaded at
the
> time of the final plotting, then it wasn't necessary to produce the
plotted
> image (which is what our archiving process is all about).
>
> Is this an easy one?
>
>
>
>
>
*Wojtynek, Steve
Message 4 of 4 (908 Views)

Re: Detach Unloaded Xrefs Routine

12-02-2003 05:29 AM in reply to: *Wojtynek, Steve
Jeff: Haven't tried it yet, but thanks again. (You helped with another one
a while back.)

Jan: Education only occurs when someone wants to learn something... I
created a magic toolbar button called CLN UP that runs a script to Purge,
Audit, change Xref paths to "no path", and then Save. I figure people might
practice a little "Cad Hygiene" if they can hit one button to do it. I'll
be adding Jeff's routine to a similar script for final archiving purposes.
I don't want to strip out unloaded xrefs when people might still need them.
Thanks for the input.


"Steve Wojtynek" wrote in message
news:9A16C317881C025CFFB97DD1636DA96F@in.WebX.maYIadrTaRb...
> It seems some people like to Unload the xrefs they used for five minutes
> rather than detaching them when finished. Then the xref gets deleted down
> the road... You know.
>
> I could use a routine that will get rid of xrefs that are not needed when
> the project is finished. I'm figuring that if the xref was Unloaded at
the
> time of the final plotting, then it wasn't necessary to produce the
plotted
> image (which is what our archiving process is all about).
>
> Is this an easy one?
>
>
>
>
>

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community