Export Save as type option

kmarkopouliotis
Advocate
Advocate

Export Save as type option

kmarkopouliotis
Advocate
Advocate

Hi,

I'm trying to develop a macro that is going to Export as

"Autodesk Geometry(*.dgk)" AND "Autodesk Geometry + Features (*.dgk)"

 a selected component (or model).

The MAJOR PROBLEM is that i cannot get for each case the Save as type option.

I've recorded 2 seperate macros in order to export as (1st) "Autodesk Geometry(*.dgk)" and (2nd) "Autodesk Geometry + Features (*.dgk)".

These to macros have exactly the same code.

Does anyone have any idea on how to get Save as type "value" for exporting as "Autodesk Geometry + Features (*.dgk)".

 

Thank you all.

 

 

0 Likes
Reply
1,191 Views
4 Replies
Replies (4)

Anonymous
Not applicable

Hi Kmarkopouliotis

Macro Operation is an automate repetitive computer tasks (usually more than one task).

What is your purpose to make a macro for a simple task like as "export" in powershape?

 

0 Likes

kmarkopouliotis
Advocate
Advocate

Hi,

My purpose is to Export a selected Solid or Component in 4 formats [Save as type] :

  1. Parasolid(*.x_t)
  2. Adobe Acrobat Document (*.pdf)
  3. Autodesk Geometry (*.dgk)
  4. Autodesk Geometry + Features (*.dgk) [provides an *.xml with all features]I want to Export Solid's/Component's Feature's in order to make use of the in PowerMill.

Does anyone have another option in order to export features ???

0 Likes

davide.torres
Advocate
Advocate

Hello @kmarkopouliotis 

I use an macro to export ".x_t" (parasolid) and ".igs"

 

I can help you on your point 1, if i remember tomorrow i will post the solution for that (right now im not at my workplace)

After it, you can try change the formats and see if it work.

0 Likes

davide.torres
Advocate
Advocate

As i said:

 

[

INPUT FREE

//Give a name to your file

INPUT TEXT 'Insert file name' $name

LET $filename = %name

//Path of your file
LET $path = 'C:\Users\pcname\Desktop\'

//Select all solids on screen
QUICK QUICKSELECTSOLIDONLY

//Export selection
LET expCommand = concatenate('file export '; $path; $filename; '.x_t')
EXECUTE COMMAND $expCommand

//Clear the selection

SELECT CLEARLIST

]

 

There is many way to use this commands. You can add the "filename" by many ways, and there are other ways to select path of your files.

 

To try the other formats you should edit the line of export defenition:" LET expCommand = concatenate('file export '; $path; $filename; '.x_t') "

Like:

 

[

INPUT FREE

//Give a name to your file

INPUT TEXT 'Insert file name' $name

LET $filename = %name

//Path of your file
LET $path = 'C:\Users\pcname\Desktop\'

//Select all solids on screen
QUICK QUICKSELECTSOLIDONLY

//Export selection
LET expCommand = concatenate('file export '; $path; $filename; '.x_t')
EXECUTE COMMAND $expCommand

//Clear the selection

SELECT CLEARLIST

//End of parasolid------------------------------------------------------------------------------------------------

//Select all solids on screen
QUICK QUICKSELECTSOLIDONLY

//Export selection
LET expCommand = concatenate('file export '; $path; $filename; '.pdf')
EXECUTE COMMAND $expCommand

//Clear the selection

SELECT CLEARLIST

//End of pdf------------------------------------------------------------------------------------------------

//Select all solids on screen
QUICK QUICKSELECTSOLIDONLY

//Export selection
LET expCommand = concatenate('file export '; $path; $filename; '.dgk')
EXECUTE COMMAND $expCommand

//Clear the selection

SELECT CLEARLIST

//End of dgk------------------------------------------------------------------------------------------------

]

 

I wish that this can help you

0 Likes