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

Toolpath Strategy Names for Macro

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
mechzombie
767 Views, 5 Replies

Toolpath Strategy Names for Macro

Hi, I am making a macro to rename the toolpath based on the Toolpath Strategy used.

 

I have found a few articles on the forum using a few Strategies like Drill/ Chamfer/ Offset area clearance. I wanted t0 know the names of other strategies, for example Constant Z.

 

Below is the basic code I am using to Check Strategy type.

 

If $tp_cnt.Strategy == "drill"

If $tp_cnt.Strategy == "chamfer"

 

Similarly, I wanted to do the same for other Strategies, mainly Constant Z/ Offset Flat/ Raster Flat/ Face Milling.

Labels (2)
5 REPLIES 5
Message 2 of 6
lokesh.kalia
in reply to: mechzombie

Hello @mechzombie . The names of the states in the Strategy parameter are as follows:

  • Constant Z: constantz
  • Offset Flat: offset_flat
  • Raster Flat: raster_flat
  • Face:  face

In general you can find the strategy name of a toolpath as follows:

ENTITY tp = entity('toolpath', 'tpname')        
print par $tp.Strategy

where tpname is the name of the toolpath entity. If you just have the pair of single quotes, this will refer to the active entity, if there is one.

 



Lokesh Kalia
Senior Manager, Software Development
Message 3 of 6
mechzombie
in reply to: lokesh.kalia

Thank you very much for the info.

 

Have another follow-up question though.

 

Model Area Clearance/ Model Rest Area Clearance/ Slice Area clearance, all three have the same name "offset_area_clear". How do I differentiate them in the macro program?

Message 4 of 6

Hi,  @mechzombie 

You also can search more the name of the states in the Strategy parameter here:

 

 

Message 5 of 6
lokesh.kalia
in reply to: mechzombie

Yes, Slice Area Clearance is a bit different. Essentially, it's just another view on the offset and raster area clearance strategies rather than its own strategy. A dropdown in the Style frame switches between the different Strategy types. You could distinguish between the different varieties by checking the parameter referred to below:

print par $AreaClearance.Slicer.Type

You can distinguish between area clearance and rest area clearance by checking whether the following parameter has been set:

print par $AreaClearance.Rest.Active

It is 1 for rest area clearance toolpaths and 0 otherwise. - In case you haven't used this before, if you set 'Echo Commands', clicking on a widget will show the underlying command. In some cases (though not all, sadly) this might reveal the underlying parameter. Similarly, right-clicking on some widgets (not dropdowns,  nor tick-boxes)  raises a menu, from which the Properties option can also reveal the underlying parameter.

 

As @nguyenthinhvt95 has referred to above, you can find more details in the Area Clearance section of the Reference documentation.



Lokesh Kalia
Senior Manager, Software Development
Message 6 of 6
mechzombie
in reply to: mechzombie

Thank you both for the help here.

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report