Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Automatic convert layers

8 REPLIES 8
Reply
Message 1 of 9
deansaunders
402 Views, 8 Replies

Automatic convert layers

Hi
We recieve alot of drawings from a partner which use another layer standard than us.
I want their layers to automatically be changed to our layers when one of their drawings is opened.
Layer translator does this manually, but i want this to be done automatically.
Any ideas how this can be done?
Dean
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: deansaunders

Hi Dean,

*If* there is a fixed correlation between their layers and yours (i.e. you
can make a *complete* list of = ), then you could
(1) get/make a sample file with all of those layers represented (like their
standard template file and yours), (2) map their layers to yours in
LayTrans, (3) save those mappings to a .dst file in LayTrans, and then (4)
program (laytrans) into your startup using that .dst file.

If you can't come up with a reliable catch-all mapping table up front, there
are other options but they are far more complicated...

--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO


wrote in message news:5375181@discussion.autodesk.com...
Hi
We recieve alot of drawings from a partner which use another layer standard
than us.
I want their layers to automatically be changed to our layers when one of
their drawings is opened.
Layer translator does this manually, but i want this to be done
automatically.
Any ideas how this can be done?
Dean
Message 3 of 9
Anonymous
in reply to: deansaunders

Hi James,

Good to see you here.

Regarding Dean's question, it seems to me the two offices/partners would have to
agree on a common set of layer names for the automatic layer translation idea to
work. If they can agree on that, why not simply agree to use the same layer names on
common projects? Which avoids the translation issues.

Joe Burke
Message 4 of 9
Anonymous
in reply to: deansaunders

Joe,

Not really. What happens if they agree that doors should be on A-Door, but
one office wants the layer to display in red, and plot at 0.5mm, but the
other office wants it displayed as gray, and plot at 0.25mm?

Although they may agree on names, the properties will likely still need
translation or XRef handling.

Dean,

This bit of LISP will run a translation w/out user input required.

(cond ((not (member "laytrans.arx" (arx))) (arxload "laytrans")))
(acet-laytrans "Partner.dws" (+ 1 4 8))


--
R. Robert Bell


"Joe Burke" wrote in message
news:5375638@discussion.autodesk.com...
Hi James,

Good to see you here.

Regarding Dean's question, it seems to me the two offices/partners would
have to
agree on a common set of layer names for the automatic layer translation
idea to
work. If they can agree on that, why not simply agree to use the same layer
names on
common projects? Which avoids the translation issues.

Joe Burke
Message 5 of 9
Anonymous
in reply to: deansaunders

Robert,

I appreciate your point. I focused on the layer name issue because that's the most
difficult thing to deal with IMO.

Joe Burke


"R. Robert Bell" wrote in message
news:5375672@discussion.autodesk.com...
Joe,

Not really. What happens if they agree that doors should be on A-Door, but
one office wants the layer to display in red, and plot at 0.5mm, but the
other office wants it displayed as gray, and plot at 0.25mm?

Although they may agree on names, the properties will likely still need
translation or XRef handling.

Dean,

This bit of LISP will run a translation w/out user input required.

(cond ((not (member "laytrans.arx" (arx))) (arxload "laytrans")))
(acet-laytrans "Partner.dws" (+ 1 4 8))


--
R. Robert Bell


"Joe Burke" wrote in message
news:5375638@discussion.autodesk.com...
Hi James,

Good to see you here.

Regarding Dean's question, it seems to me the two offices/partners would
have to
agree on a common set of layer names for the automatic layer translation
idea to
work. If they can agree on that, why not simply agree to use the same layer
names on
common projects? Which avoids the translation issues.

Joe Burke
Message 6 of 9
deansaunders
in reply to: deansaunders

thanks for taking the time to answer my question.
the names of the layers coming from our partner is always the same, and it's only 11 different layer names.
so it sounds like you have solved this problem for me, but i can't get your routine to work... i get the following error when i try to run it: The specified file could not be found.; error: ADS request error
pls help 🙂
dean
Message 7 of 9
Anonymous
in reply to: deansaunders

In order for Robert's code to work, you will have to create your own
"Partner.dws" file (use whatever name you want). He was giving you a start
on the code for Step (4) in my post (except that I mistakenly called it a
.dst file).

James


wrote in message news:5376599@discussion.autodesk.com...
thanks for taking the time to answer my question.
the names of the layers coming from our partner is always the same, and it's
only 11 different layer names.
so it sounds like you have solved this problem for me, but i can't get your
routine to work... i get the following error when i try to run it: The
specified file could not be found.; error: ADS request error
pls help 🙂
dean
Message 8 of 9
Anonymous
in reply to: deansaunders

Hi Joe,

Thanks. It's been a while.

In addition to what Robert said, they may not have that luxury. In my case
for example, we occasionally do some state work. The state requires that
CAD deliverables conform to their standards (esp. layer names), but we have
our own standard layer names on which our in-house tools are dependent (a
bit too much so, unfortunately). We haven't agreed on anything with the
state, but we do know what layer names/props they expect, so we have a
static State.dws file that defines the mapping of our standard layers to
theirs.
--
James Allen
Malicoat-Winslow Engineers, P.C.
Columbia, MO


"Joe Burke" wrote in message
news:5375638@discussion.autodesk.com...
Hi James,

Good to see you here.

Regarding Dean's question, it seems to me the two offices/partners would
have to
agree on a common set of layer names for the automatic layer translation
idea to
work. If they can agree on that, why not simply agree to use the same layer
names on
common projects? Which avoids the translation issues.

Joe Burke
Message 9 of 9
Anonymous
in reply to: deansaunders

We do that with our government jobs also. Work using our own layers, convert
on copies only for submittals.

--
R. Robert Bell


"James Allen" wrote in message
news:5376725@discussion.autodesk.com...
Hi Joe,

Thanks. It's been a while.

In addition to what Robert said, they may not have that luxury. In my case
for example, we occasionally do some state work. The state requires that
CAD deliverables conform to their standards (esp. layer names), but we have
our own standard layer names on which our in-house tools are dependent (a
bit too much so, unfortunately). We haven't agreed on anything with the
state, but we do know what layer names/props they expect, so we have a
static State.dws file that defines the mapping of our standard layers to
theirs.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost