PowerMill 2025 and the PowerMill 2025.0.1 Hot Fix were released today. Over the next few weeks, you will see PowerMill 2025 and PowerMill 2025.0.1 Hot Fix availability in your account. Please check your Autodesk Account or Autodesk Access to see when your entitlement is available for download.
When you install PowerMill 2025, the PowerMill 2025.0.1 Hot Fix should automatically install with it. Alternatively, you can download the PowerMill 2025.0.1 Hot Fix from the Product Updates area of your Autodesk Account. To confirm that you've successfully installed the PowerMill 2025.0.1 Hot Fix, select the ? > About menu option in your PowerMill 2025 software and check that you're working in Version: 2025.0.1.2025012.
In the meantime, you can review the Help and Release Notes to see what is being delivered in PowerMill 2025 and the PowerMill 2025.0.1 Hot Fix.
Thank you
PowerMill 2025 and the PowerMill 2025.0.1 Hot Fix were released today. Over the next few weeks, you will see PowerMill 2025 and PowerMill 2025.0.1 Hot Fix availability in your account. Please check your Autodesk Account or Autodesk Access to see when your entitlement is available for download.
When you install PowerMill 2025, the PowerMill 2025.0.1 Hot Fix should automatically install with it. Alternatively, you can download the PowerMill 2025.0.1 Hot Fix from the Product Updates area of your Autodesk Account. To confirm that you've successfully installed the PowerMill 2025.0.1 Hot Fix, select the ? > About menu option in your PowerMill 2025 software and check that you're working in Version: 2025.0.1.2025012.
In the meantime, you can review the Help and Release Notes to see what is being delivered in PowerMill 2025 and the PowerMill 2025.0.1 Hot Fix.
Thank you
Only Toolpaths though Sean
Only Toolpaths though Sean
Hi @icse,
I'd like to add models to the Export macro but I get an error at line 146, could you help?
Appreciated!
if length(project_pathname(0)) == 0 OR project_modified() == 1 {
message warn 'Save First'
return
}
string $path = "C:/Temp/EntityExport"
if dir_exists($path) {
bool $query = 0
$query = query "Replace existing Entities?"
if $query {
delete directory $path
} else {
return
}
}
string list $inputTypes = {'toolpath','tool','boundary','pattern','featureset','workplane','model'}
int list $indexer = input choice multiple $inputTypes 'Choose Type of Entity to Export'
entity list $entitiesToExport = {}
foreach $index in $indexer {
entity list $entities = {}
SWITCH $index {
Case 0
$entities = input entity multiple toolpath 'Select Toolpaths to Export'
Break
Case 1
$entities = input entity multiple tool 'Select Tools to Export'
Break
Case 2
$entities = input entity multiple boundary 'Select Boundaries to Export'
Break
Case 3
$entities = input entity multiple pattern 'Select Patterns to Export'
Break
Case 4
$entities = input entity multiple featureset 'Select Featuresets to Export'
Break
Case 5
$entities = input entity multiple workplane 'Select Workplanes to Export'
Break
Case 6
$entities = input entity multiple model 'Select Models to Export'
Break
DEFAULT
return
BREAK
}
foreach $ent in $entities {
int $i = add_last($entitiesToExport, $ent)
}
}
mkdir $path
//Active entity file
string $activeEntityFilePath = $path + '/active_entity.pmldat'
string $op = '0 1 # Active Entities (DO NOT EDIT!)'
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
int $entCount = 0
string $content = ''
foreach $e in $entitiesToExport {
if entity_exists($e) {
if $e.RootType == 'toolpath' {
string $eHash = "x" + $e.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntToolpath '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
$eHash = "x" + $e.ID + ".pmlgeom"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
copy file $e_full $path_full
if entity_exists($e.Boundary) {
$eHash = "x" + $e.Boundary.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Boundary.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Pattern) {
$eHash = "x" + $e.Pattern.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Pattern.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Tool) {
$eHash = "x" + $e.Tool.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Tool.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Workplane) {
$eHash = "x" + $e.Workplane.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Workplane.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Featureset) {
$eHash = "x" + $e.Featureset.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Featureset.Name + "'" + CRLF
}
copy file $e_full $path_full
}
}
if entity_exists($e.Model) {
$eHash = "x" + $e.Model.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Model.Name + "'" + CRLF
}
copy file $e_full $path_full
}
continue
}
if $e.RootType == 'boundary' {
string $eHash = "x" + $e.Boundary.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'pattern' {
string $eHash = "x" + $e.Pattern.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'tool' {
string $eHash = "x" + $e.Tool.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'workplane' {
string $eHash = "x" + $e.Workplane.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'featureset' {
string $eHash = "x" + $e.Featureset.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'model' {
string $eHash = "x" + $e.model.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
}
}
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
string $proj_name = "\" + project_pathname(1) + ".pmlprj"
string $path_full = project_pathname(0) + $proj_name
file open $path_full for read as input
string $line1 = ''
string $line2 = ''
string $line3 = ''
file read $line1 from input
file read $line2 from input
file read $line3 from input
file close input
$line1 = $entCount + substring($line1, position($line1, ' ', 0), length($line1))
string $dest_path_full = $path + $proj_name
file open $dest_path_full FOR WRITE AS output
file write $line1 to "output"
file write $line2 to "output"
file write $line3 to "output"
file write $content to "output"
file close output
Hi @icse,
I'd like to add models to the Export macro but I get an error at line 146, could you help?
Appreciated!
if length(project_pathname(0)) == 0 OR project_modified() == 1 {
message warn 'Save First'
return
}
string $path = "C:/Temp/EntityExport"
if dir_exists($path) {
bool $query = 0
$query = query "Replace existing Entities?"
if $query {
delete directory $path
} else {
return
}
}
string list $inputTypes = {'toolpath','tool','boundary','pattern','featureset','workplane','model'}
int list $indexer = input choice multiple $inputTypes 'Choose Type of Entity to Export'
entity list $entitiesToExport = {}
foreach $index in $indexer {
entity list $entities = {}
SWITCH $index {
Case 0
$entities = input entity multiple toolpath 'Select Toolpaths to Export'
Break
Case 1
$entities = input entity multiple tool 'Select Tools to Export'
Break
Case 2
$entities = input entity multiple boundary 'Select Boundaries to Export'
Break
Case 3
$entities = input entity multiple pattern 'Select Patterns to Export'
Break
Case 4
$entities = input entity multiple featureset 'Select Featuresets to Export'
Break
Case 5
$entities = input entity multiple workplane 'Select Workplanes to Export'
Break
Case 6
$entities = input entity multiple model 'Select Models to Export'
Break
DEFAULT
return
BREAK
}
foreach $ent in $entities {
int $i = add_last($entitiesToExport, $ent)
}
}
mkdir $path
//Active entity file
string $activeEntityFilePath = $path + '/active_entity.pmldat'
string $op = '0 1 # Active Entities (DO NOT EDIT!)'
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
int $entCount = 0
string $content = ''
foreach $e in $entitiesToExport {
if entity_exists($e) {
if $e.RootType == 'toolpath' {
string $eHash = "x" + $e.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntToolpath '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
$eHash = "x" + $e.ID + ".pmlgeom"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
copy file $e_full $path_full
if entity_exists($e.Boundary) {
$eHash = "x" + $e.Boundary.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Boundary.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Pattern) {
$eHash = "x" + $e.Pattern.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Pattern.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Tool) {
$eHash = "x" + $e.Tool.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Tool.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Workplane) {
$eHash = "x" + $e.Workplane.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Workplane.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Featureset) {
$eHash = "x" + $e.Featureset.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Featureset.Name + "'" + CRLF
}
copy file $e_full $path_full
}
}
if entity_exists($e.Model) {
$eHash = "x" + $e.Model.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Model.Name + "'" + CRLF
}
copy file $e_full $path_full
}
continue
}
if $e.RootType == 'boundary' {
string $eHash = "x" + $e.Boundary.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'pattern' {
string $eHash = "x" + $e.Pattern.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'tool' {
string $eHash = "x" + $e.Tool.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'workplane' {
string $eHash = "x" + $e.Workplane.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'featureset' {
string $eHash = "x" + $e.Featureset.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'model' {
string $eHash = "x" + $e.model.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
}
}
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
string $proj_name = "\" + project_pathname(1) + ".pmlprj"
string $path_full = project_pathname(0) + $proj_name
file open $path_full for read as input
string $line1 = ''
string $line2 = ''
string $line3 = ''
file read $line1 from input
file read $line2 from input
file read $line3 from input
file close input
$line1 = $entCount + substring($line1, position($line1, ' ', 0), length($line1))
string $dest_path_full = $path + $proj_name
file open $dest_path_full FOR WRITE AS output
file write $line1 to "output"
file write $line2 to "output"
file write $line3 to "output"
file write $content to "output"
file close output
You got one } to much and i think you also need to copy .pmlmz file:
if length(project_pathname(0)) == 0 OR project_modified() == 1 {
message warn 'Save First'
return
}
string $path = "C:/Temp/EntityExport"
if dir_exists($path) {
bool $query = 0
$query = query "Replace existing Entities?"
if $query {
delete directory $path
} else {
return
}
}
string list $inputTypes = {'toolpath','tool','boundary','pattern','featureset','workplane','model'}
int list $indexer = input choice multiple $inputTypes 'Choose Type of Entity to Export'
entity list $entitiesToExport = {}
foreach $index in $indexer {
entity list $entities = {}
SWITCH $index {
Case 0
$entities = input entity multiple toolpath 'Select Toolpaths to Export'
Break
Case 1
$entities = input entity multiple tool 'Select Tools to Export'
Break
Case 2
$entities = input entity multiple boundary 'Select Boundaries to Export'
Break
Case 3
$entities = input entity multiple pattern 'Select Patterns to Export'
Break
Case 4
$entities = input entity multiple featureset 'Select Featuresets to Export'
Break
Case 5
$entities = input entity multiple workplane 'Select Workplanes to Export'
Break
Case 6
$entities = input entity multiple model 'Select Models to Export'
Break
DEFAULT
return
BREAK
}
foreach $ent in $entities {
int $i = add_last($entitiesToExport, $ent)
}
}
mkdir $path
//Active entity file
string $activeEntityFilePath = $path + '/active_entity.pmldat'
string $op = '0 1 # Active Entities (DO NOT EDIT!)'
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
int $entCount = 0
string $content = ''
foreach $e in $entitiesToExport {
if entity_exists($e) {
if $e.RootType == 'toolpath' {
string $eHash = "x" + $e.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntToolpath '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
$eHash = "x" + $e.ID + ".pmlgeom"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
copy file $e_full $path_full
if entity_exists($e.Boundary) {
$eHash = "x" + $e.Boundary.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Boundary.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Pattern) {
$eHash = "x" + $e.Pattern.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Pattern.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Tool) {
$eHash = "x" + $e.Tool.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Tool.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Workplane) {
$eHash = "x" + $e.Workplane.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Workplane.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Featureset) {
$eHash = "x" + $e.Featureset.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Featureset.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Model) {
$eHash = "x" + $e.Model.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Model.Name + "'" + CRLF
}
copy file $e_full $path_full
}
continue
}
if $e.RootType == 'boundary' {
string $eHash = "x" + $e.Boundary.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'pattern' {
string $eHash = "x" + $e.Pattern.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'tool' {
string $eHash = "x" + $e.Tool.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'workplane' {
string $eHash = "x" + $e.Workplane.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'featureset' {
string $eHash = "x" + $e.Featureset.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'model' {
string $eHash = "x" + $e.model.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
$eHash = "x" + $e.model.ID + ".pmlmz"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
copy file $e_full $path_full
continue
}
}
}
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
string $proj_name = "\" + project_pathname(1) + ".pmlprj"
string $path_full = project_pathname(0) + $proj_name
file open $path_full for read as input
string $line1 = ''
string $line2 = ''
string $line3 = ''
file read $line1 from input
file read $line2 from input
file read $line3 from input
file close input
$line1 = $entCount + substring($line1, position($line1, ' ', 0), length($line1))
string $dest_path_full = $path + $proj_name
file open $dest_path_full FOR WRITE AS output
file write $line1 to "output"
file write $line2 to "output"
file write $line3 to "output"
file write $content to "output"
file close output
We probably should open a new post insted of spamming here 😛
You got one } to much and i think you also need to copy .pmlmz file:
if length(project_pathname(0)) == 0 OR project_modified() == 1 {
message warn 'Save First'
return
}
string $path = "C:/Temp/EntityExport"
if dir_exists($path) {
bool $query = 0
$query = query "Replace existing Entities?"
if $query {
delete directory $path
} else {
return
}
}
string list $inputTypes = {'toolpath','tool','boundary','pattern','featureset','workplane','model'}
int list $indexer = input choice multiple $inputTypes 'Choose Type of Entity to Export'
entity list $entitiesToExport = {}
foreach $index in $indexer {
entity list $entities = {}
SWITCH $index {
Case 0
$entities = input entity multiple toolpath 'Select Toolpaths to Export'
Break
Case 1
$entities = input entity multiple tool 'Select Tools to Export'
Break
Case 2
$entities = input entity multiple boundary 'Select Boundaries to Export'
Break
Case 3
$entities = input entity multiple pattern 'Select Patterns to Export'
Break
Case 4
$entities = input entity multiple featureset 'Select Featuresets to Export'
Break
Case 5
$entities = input entity multiple workplane 'Select Workplanes to Export'
Break
Case 6
$entities = input entity multiple model 'Select Models to Export'
Break
DEFAULT
return
BREAK
}
foreach $ent in $entities {
int $i = add_last($entitiesToExport, $ent)
}
}
mkdir $path
//Active entity file
string $activeEntityFilePath = $path + '/active_entity.pmldat'
string $op = '0 1 # Active Entities (DO NOT EDIT!)'
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
int $entCount = 0
string $content = ''
foreach $e in $entitiesToExport {
if entity_exists($e) {
if $e.RootType == 'toolpath' {
string $eHash = "x" + $e.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntToolpath '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
$eHash = "x" + $e.ID + ".pmlgeom"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
copy file $e_full $path_full
if entity_exists($e.Boundary) {
$eHash = "x" + $e.Boundary.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Boundary.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Pattern) {
$eHash = "x" + $e.Pattern.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Pattern.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Tool) {
$eHash = "x" + $e.Tool.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Tool.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Workplane) {
$eHash = "x" + $e.Workplane.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Workplane.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Featureset) {
$eHash = "x" + $e.Featureset.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Featureset.Name + "'" + CRLF
}
copy file $e_full $path_full
}
if entity_exists($e.Model) {
$eHash = "x" + $e.Model.ID + ".pmlent"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Model.Name + "'" + CRLF
}
copy file $e_full $path_full
}
continue
}
if $e.RootType == 'boundary' {
string $eHash = "x" + $e.Boundary.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntBoundary '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'pattern' {
string $eHash = "x" + $e.Pattern.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntPattern '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'tool' {
string $eHash = "x" + $e.Tool.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntTool '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'workplane' {
string $eHash = "x" + $e.Workplane.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntWorkplane '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'featureset' {
string $eHash = "x" + $e.Featureset.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntFeature '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
continue
}
if $e.RootType == 'model' {
string $eHash = "x" + $e.model.ID + ".pmlent"
string $e_full = project_pathname(0) + "/" + $eHash
string $path_full = $path + "/" + $eHash
if not file_exists($path_full) {
$entCount = $entCount + 1
$content = $content + $eHash + " pmlEntModel '" + $e.Name + "'" + CRLF
}
copy file $e_full $path_full
$eHash = "x" + $e.model.ID + ".pmlmz"
$e_full = project_pathname(0) + "/" + $eHash
$path_full = $path + "/" + $eHash
copy file $e_full $path_full
continue
}
}
}
if file_exists($activeEntityFilePath) {
delete File $activeEntityFilePath
}
file open $activeEntityFilePath for write as output
file write $op to output
file close output
string $proj_name = "\" + project_pathname(1) + ".pmlprj"
string $path_full = project_pathname(0) + $proj_name
file open $path_full for read as input
string $line1 = ''
string $line2 = ''
string $line3 = ''
file read $line1 from input
file read $line2 from input
file read $line3 from input
file close input
$line1 = $entCount + substring($line1, position($line1, ' ', 0), length($line1))
string $dest_path_full = $path + $proj_name
file open $dest_path_full FOR WRITE AS output
file write $line1 to "output"
file write $line2 to "output"
file write $line3 to "output"
file write $content to "output"
file close output
We probably should open a new post insted of spamming here 😛
I've noticed a bug when pasting a toolpath and renumbering the pasted toolpath Powermill seems to reorder single-character toolpath names from the toolpath list.
I've noticed a bug when pasting a toolpath and renumbering the pasted toolpath Powermill seems to reorder single-character toolpath names from the toolpath list.
Is it possible to remove the logo when you start Powermill?
It blocks half of the screen...
Is it possible to remove the logo when you start Powermill?
It blocks half of the screen...
Hi Guys, Could we please get a solution to display the tool numbers in the tools folder, (so if I set the tool to Tool 2, perhaps automatically add a #2 before the Tool name?)
We are a job shop that is for ever changing jobs and tools. trying to remember what tools are set/empty can be a serious headache.
hope its possible to add into an update sometime.
(automatically add after the tool symbol)
(Active tool : #2 > EM-3.0-SC)
Hi Guys, Could we please get a solution to display the tool numbers in the tools folder, (so if I set the tool to Tool 2, perhaps automatically add a #2 before the Tool name?)
We are a job shop that is for ever changing jobs and tools. trying to remember what tools are set/empty can be a serious headache.
hope its possible to add into an update sometime.
(automatically add after the tool symbol)
(Active tool : #2 > EM-3.0-SC)
I've added the active tool number as an expression in the quick access toolbar. Not exactly what you're looking for, but I find it pretty helpful.
I've added the active tool number as an expression in the quick access toolbar. Not exactly what you're looking for, but I find it pretty helpful.
That is an excellent idea, perhaps suited to something else for us. It gets a bit annoying to try and slot a new tool into the tool carousel, sometimes we run into a tough situation because our machines have 21 tools. sometimes we are able to modify our approach to fit the number of tools in the machine. but trying to remember where you have set those tools to find the last 3 open spots can become laborious. (post out to find tool number collision -> update the tool number, clashes with the next tool etc)
If the information could be displayed in the tool icon are as a default, without updating the tool name. it could be a visible cue to the programmers to try and slot the tools into the carousel.
I hope that gives a little more clarity.
That is an excellent idea, perhaps suited to something else for us. It gets a bit annoying to try and slot a new tool into the tool carousel, sometimes we run into a tough situation because our machines have 21 tools. sometimes we are able to modify our approach to fit the number of tools in the machine. but trying to remember where you have set those tools to find the last 3 open spots can become laborious. (post out to find tool number collision -> update the tool number, clashes with the next tool etc)
If the information could be displayed in the tool icon are as a default, without updating the tool name. it could be a visible cue to the programmers to try and slot the tools into the carousel.
I hope that gives a little more clarity.
this macro pops up a message box with the first free tool number:
int list $toolnumblist = extract(folder('TOOL'), 'Tool.Number.Value')
int $newToolNumb = 1
while member( $toolnumblist, $newToolNumb) {
$newToolNumb = $newToolNumb + 1
}
Message Info $newToolNumb
this macro shows you all tools with duplicate numbers:
int list $toolnumbers = extract(folder('tool'),'Number.Value')
int $i = remove_duplicates($toolnumbers)
string $op = ''
foreach $n in $toolnumbers {
string list $names = extract(filter(folder('tool'),'this.Number.Value == "' + $n + '"'),'Name')
if size($names) > 1 {
$op = $op + 'T ' + $n + CRLF
foreach $name in $names {
$op = $op + $name + CRLF
}
$op = $op + CRLF
}
}
message info $op
this macro pops up a message box with the first free tool number:
int list $toolnumblist = extract(folder('TOOL'), 'Tool.Number.Value')
int $newToolNumb = 1
while member( $toolnumblist, $newToolNumb) {
$newToolNumb = $newToolNumb + 1
}
Message Info $newToolNumb
this macro shows you all tools with duplicate numbers:
int list $toolnumbers = extract(folder('tool'),'Number.Value')
int $i = remove_duplicates($toolnumbers)
string $op = ''
foreach $n in $toolnumbers {
string list $names = extract(filter(folder('tool'),'this.Number.Value == "' + $n + '"'),'Name')
if size($names) > 1 {
$op = $op + 'T ' + $n + CRLF
foreach $name in $names {
$op = $op + $name + CRLF
}
$op = $op + CRLF
}
}
message info $op
I got ya now. You're looking for the tools that aren't there.
I got ya now. You're looking for the tools that aren't there.
What would be really handy is a variation on this that will return the unused tool numbers from a compliment of say 60 tools?
Best Regards
What would be really handy is a variation on this that will return the unused tool numbers from a compliment of say 60 tools?
Best Regards
You could automatically give the active tool if that tool does not have a number the first free tool number.
to show a list of all free tool numbers from 1 to 60 you could use something like this:
int list $toolnumblist = extract(folder('TOOL'), 'Tool.Number.Value')
int $numb = 1
int list $freeNumbs = {}
string $op = ''
while $numb <= 60 {
if not member( $toolnumblist, $numb) {
int $i = add_last($freeNumbs,$numb)
$op = $op + $numb + CRLF
}
$numb = $numb + 1
}
Message Info $op
You could automatically give the active tool if that tool does not have a number the first free tool number.
to show a list of all free tool numbers from 1 to 60 you could use something like this:
int list $toolnumblist = extract(folder('TOOL'), 'Tool.Number.Value')
int $numb = 1
int list $freeNumbs = {}
string $op = ''
while $numb <= 60 {
if not member( $toolnumblist, $numb) {
int $i = add_last($freeNumbs,$numb)
$op = $op + $numb + CRLF
}
$numb = $numb + 1
}
Message Info $op
Regarding the drawing of the stock in Setups in the release notes, how does this work? When turning it off and deactivating the setup but then re-activating it, it just draws again every time. I was hoping it would keep it undrawn every time.
And how is this any different from older versions? 2023 has the same options
Regarding the drawing of the stock in Setups in the release notes, how does this work? When turning it off and deactivating the setup but then re-activating it, it just draws again every time. I was hoping it would keep it undrawn every time.
And how is this any different from older versions? 2023 has the same options
Sorry. Problem is in powershape 2025.
Sorry. Problem is in powershape 2025.
Have you raised CERs? Can you send me your email in a DM so I track them down.
Do you have a project and/or some reproduction instructions you could send to me too so I can try and reproduce the issue?
Have you raised CERs? Can you send me your email in a DM so I track them down.
Do you have a project and/or some reproduction instructions you could send to me too so I can try and reproduce the issue?
It is a pity that having RAM capacities larger than 16 GB PowerMill only uses a maximum of 12 GB
It is a pity that having RAM capacities larger than 16 GB PowerMill only uses a maximum of 12 GB
Please can we add a section in toolpath reorder within the nc program ( Re-order by SETUP toolpath order) (see picture below)
We often run a multiple setup, and try and save on the tool change time across the batch.
We are currently using setups to add repeatability and lighten the project by not having models in the translated positions.
This means that every toolpath edit makes it into each part with out being translated and copied to the next position.
(provided the fixture offsets are setup correctly eg. G54 / G55 / G56 etc.)
We currently have to manually reorder every toolpath in the nc file.
(currently with 2 setups added into an nc file)
toolpath 1 : setup 1
toolpath 2 : setup 1
toolpath 3 : setup 1
toolpath 4 : setup 1
etc.
(this is what we would like out of an automatic reorder)
toolpath 1 : setup 1
toolpath 1 : setup 2
toolpath 2 : setup 1
toolpath 2 : setup 2
etc.
kind regards Nathan
Please can we add a section in toolpath reorder within the nc program ( Re-order by SETUP toolpath order) (see picture below)
We often run a multiple setup, and try and save on the tool change time across the batch.
We are currently using setups to add repeatability and lighten the project by not having models in the translated positions.
This means that every toolpath edit makes it into each part with out being translated and copied to the next position.
(provided the fixture offsets are setup correctly eg. G54 / G55 / G56 etc.)
We currently have to manually reorder every toolpath in the nc file.
(currently with 2 setups added into an nc file)
toolpath 1 : setup 1
toolpath 2 : setup 1
toolpath 3 : setup 1
toolpath 4 : setup 1
etc.
(this is what we would like out of an automatic reorder)
toolpath 1 : setup 1
toolpath 1 : setup 2
toolpath 2 : setup 1
toolpath 2 : setup 2
etc.
kind regards Nathan
Can't find what you're looking for? Ask the community or share your knowledge.