AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extending AcadE's language conversion utility

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
227 Views, 2 Replies

Extending AcadE's language conversion utility

The existing feature in AcadE is limited to updating specific attributes
with translated text pulled from the wd_lang1.mdb file (in the same folder
where the catalog lookup file is located). If you want to extend this so
that it can process any attribute or certain attributes on certain blocks
(ex: title block), you will need to write your own utility to do this but
have it make calls into the AcadE "API".

Attached is the framework for such a utility. You might use this "as is" or
use it as a starting point to create a version specific to your exact needs.

APPLOAD the file (may want to set SDI to 1 so that you don't have to appload
for each dwg that you open).

Syntax: (c:language from to exact langfilename options)

where

; "from" = FROM language (ex: "ENU (English-US)"

; "to" = TO language (ex: "DEU (German)") - has to be exact match with
column label that is in database

; "langfilename" = language file to use (nil = use "wd_lang1.mdb")

; "exact" = 1 for exact, 2=partial

; "options" = 1=user pick, nil or 0=process all blocks on the whole drawing

Example:

(c:language "ENU (English-US)" "ESP (Spanish)" 1 nil 0)

will process the whole drawing without prompting (the 0 parameter). It will
look

for exact matches only (the 1 parameter).
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

The existing feature in AcadE is limited to updating specific attributes
with translated text pulled from the wd_lang1.mdb file (in the same folder
where the catalog lookup file is located). If you want to extend this so
that it can process any attribute or certain attributes on certain blocks
(ex: title block), you will need to write your own utility to do this but
have it make calls into the AcadE "API".

Attached is the framework for such a utility. You might use this "as
is" or modify to suit your specific needs. Use APPLOAD to load it. You
might want to set SDI to 1 if you are going to process many drawings. This
is a way to avoid having to reload the AutoLisp file for each drawing.

Syntax:

(c:language from_language to_language match langfilename options)

where
"from_language" = the existing language of the dwgs (ex: "ENU
(English-US)" - has to be exact match on column in the database file)
"to_language" = target language
"match" = 1 for exact matches only, 2 for substring match
"langfilename" = nil for default file wd_lang1.mdb
"options" = 0 to process all text and blocks on active drawing (no prompts),
1=prompt for select blocks/text to process

Example:

(c:language "ENU (English-US)" "DEU (German)" 1 nil 0)

will process the whole drawing without prompting user and will only convert
text/attributes on a full, exact match.
Message 3 of 3
Anonymous
in reply to: Anonymous

(having trouble getting a full messange and attached file... here is another
attempt)

"Nate Holt (Autodesk)" wrote in message
news:5089193@discussion.autodesk.com...
The existing feature in AcadE is limited to updating specific attributes
with translated text pulled from the wd_lang1.mdb file (in the same folder
where the catalog lookup file is located). If you want to extend this so
that it can process any attribute or certain attributes on certain blocks
(ex: title block), you will need to write your own utility to do this but
have it make calls into the AcadE "API".

Attached is the framework for such a utility. You might use this "as
is" or modify to suit your specific needs. Use APPLOAD to load it. You
might want to set SDI to 1 if you are going to process many drawings. This
is a way to avoid having to reload the AutoLisp file for each drawing.

Syntax:

(c:language from_language to_language match langfilename options)

where
"from_language" = the existing language of the dwgs (ex: "ENU
(English-US)" - has to be exact match on column in the database file)
"to_language" = target language
"match" = 1 for exact matches only, 2 for substring match
"langfilename" = nil for default file wd_lang1.mdb
"options" = 0 to process all text and blocks on active drawing (no prompts),
1=prompt for select blocks/text to process

Example:

(c:language "ENU (English-US)" "DEU (German)" 1 nil 0)

will process the whole drawing without prompting user and will only convert
text/attributes on a full, exact match.

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

Post to forums  

Autodesk Design & Make Report

”Boost