Author Topic: Relative Path Tool  (Read 1212 times)

0 Members and 1 Guest are viewing this topic.

cmwade77

  • Swamp Rat
  • Posts: 1443
Relative Path Tool
« on: April 21, 2021, 07:58:20 PM »
We have a lot of legacy drawings that have full saved paths and we ultimately need to change them to relative paths.

I have tried various LISP routines out there that claim to change the paths and while some work to a certain extent, none quite do everything, as we also need to repath images, DGNs, PDFs, etc.

So, I am writing an all new version that should also change the paths in all attached files.

This is very much a work in progress and nowhere near complete, but for some reason I am getting an error when trying to save the drawings.

I have attached the code so far, if someone can please let me know what I am doing wrong on the saving, I would greatly appreciate it.

There is also quite a bit of cleanup and completion to still be done.


EDIT:
I have a new version now, which is updated; however, there is an error when saving nested blocks, it returns:
"Automation Error. Description was not provided."

I know I must be missing something simple and stupid, but I can't figure it out.

« Last Edit: April 26, 2021, 06:37:23 PM by cmwade77 »

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Relative Path Tool
« Reply #1 on: April 22, 2021, 06:35:43 AM »
Just guessing...

Code: [Select]
(vla-saveas dbxApp i)
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Relative Path Tool
« Reply #2 on: April 22, 2021, 11:44:22 AM »
Thank you, I knew I was missing something obvious.

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Relative Path Tool
« Reply #3 on: April 24, 2021, 03:20:11 AM »
A dictionary is not a collection, therefore vlax-for cannot be used.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Relative Path Tool
« Reply #4 on: April 26, 2021, 06:38:22 PM »
I updated the first post, I know I must be missing something simple, but on nested xrefs, I get the following error with saveas:
"Automation Error. Description was not provided."