CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-16-2012, 09:29 AM
thomasleeclark thomasleeclark is offline
Registered User
 
Join Date: Jan 2012
Posts: 2
Mass DXF translation macro

Hello, I am a new forum user. I have OneSpace Designer Drafting 2005.

I wonder if someone could help me finish creating a special macro. I would like it to be able to search, open and translate all of the CoCreate files in a named directory into .DXF format. I have begun the following script:

DEFINE DXF2
{#This macro wil open selected or named .MI dwg file and translate to DXF format, place it in current directory, then close the .MI file##}
File_load
Set_sys_store_last_type 'DXF'
Sm_update_store_file
Store_update
DELETE ALL CONFIRM
END_DEFINE

This works pretty well, but obviously it will only do one at a time, and requires input ('load_file_name') from the user. How can I automate the macro to find each file in the current directory sequentially, load and perform the translation, close it, load the next file, etc. until it reaches the end of the directory?
Also, could I specify a target directory for the DXF files other than the Current directory?

Thank you - Thomas L. Clark, Teledyne Relays
Reply With Quote
  #2  
Old 01-17-2012, 05:02 AM
ukawa's Avatar
ukawa ukawa is offline
Registered User
 
Join Date: Apr 2004
Location: Italy
Posts: 73
Re: Mass DXF translation macro

Hello and welcome to the forum.
You can find here a working macro (or dive into the code):
http://www.cocreateusers.org/forum/showthread.php?t=4735&highlight=converti


Just change:
STORE MI ALL DEL_OLD (disegno)
to
STORE DXF ALL DEL_OLD (disegno)

and even a little work of translation


Hope this helps.
Regards.
Gabriele
Reply With Quote
  #3  
Old 01-17-2012, 01:40 PM
thomasleeclark thomasleeclark is offline
Registered User
 
Join Date: Jan 2012
Posts: 2
Re: Mass DXF translation macro

Okay, thank you Gabriele, and yes, the macro file (converti.txt) is in Italian! It sounds like this macro would do what I need (batch open and save a listing of files to a different format), but ... has no one done a macro like this in English??
Thanks - tom
Reply With Quote
  #4  
Old 01-28-2012, 01:05 PM
BMaverick's Avatar
BMaverick BMaverick is offline
Registered User
 
Join Date: Mar 2009
Location: Tennessee, U.S.A.
Posts: 267
Arrow Re: Mass DXF translation macro

Quote:
Originally Posted by thomasleeclark View Post
Okay, thank you Gabriele, and yes, the macro file (converti.txt) is in Italian! It sounds like this macro would do what I need (batch open and save a listing of files to a different format), but ... has no one done a macro like this in English??
Thanks - tom
You can be the first. Use Google translate with Bablefish to re-write the syntext into English.




.
__________________
Support Your Local Sheriff - At high noon

Jason: "How much does it pay?"
Citizen: "Well, none of our other sheriffs ever lived long enough to find out."

Co-Create 2007 (15.50G)
ANSYS Workbench 14
SolidWorks 2011
UGNX-7.5 / TeamCenter UA 8
PADS 2000
Applicon Bravo
Autotrol
CADAM
Pro/E
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 10:30 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.