PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.

PowerMill Forum

Reply
Highlighted
Post 1 of 17

Notepad++ Language for editing PowerMill macros.

607 Views, 16 Replies
11-28-2016 02:46 AM

If you would like to edit your PowerMill macro in full colours, you can use Notepad++ editor with a user defined language.

 

You can also fold code, because {} characters are set as keywords for folding.

 

EditorView.png

I have attached a .zip file that contains the PowerMill language, and a macro example.

 

You can download Notepad++ text editor from here: https://notepad-plus-plus.org/download

 

In Notepad++ click "View > User Defined Dialogue..."
Click Import button and select the "Notepad++PowerMillLanguage.XML" file.

 

Open a the PowerMill macro example "CreateBlockAndWorkplane.mac".
Code should now appear colour coded. You can fold code by "View > Fold All" command, or by clicking + and - markers.

 

You can comment and uncomment selected lines of code using Ctrl+Q shorcut.

 

If you can't see the marco in colours, try "Language > PowerMill" command from the top menu.

 

Screencast for using the PowerMill language in Notepad++ can be found here:
https://knowledge.autodesk.com/community/screencast/e7d3e8e1-5222-431d-abc0-caa356d6342

 

 

Post 2 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-28-2016 04:42 AM in reply to: PekkaJLaasanen

I attached a new version of my CreateBlockAndWorkplane.mac macro example.

 

I had it set to run in Finnish by mistake. But if you want to learn some Finnish, you can use the old macro or edit this one. 

 

Language.png

Post 3 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-28-2016 04:57 AM in reply to: PekkaJLaasanen

seems to work with powershape also...very cool





Thanks
Bruce Green
never did nothing,
BUT
try always did

if I have caused you hard feelings it was not intended. But my intent is to get the most from whatever I do.
to all that have helped me get to where I am THANKS FOR THE KNOWLEDGE

Post 4 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-28-2016 02:12 PM in reply to: PekkaJLaasanen

Hello PekkaJLaansanen,

 

I have made a user defined language for Powermill macro with auto completion, but it's on the the old power mill forum and nobody can download it if you are not register...

 

http://forum.delcam.com/viewtopic.php?f=51&t=12641

 

Do you mind if I upload it in a answer on this topic ? 

 

Alex 

 Auto%20complete.png

 

Post 5 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-29-2016 02:09 AM in reply to: PekkaJLaasanen

Brilliant!!!

Post 6 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-29-2016 03:06 AM in reply to: Alex470

Alex470 wrote:

Hello PekkaJLaansanen,

 

I have made a user defined language for Powermill macro with auto completion, but it's on the the old power mill forum and nobody can download it if you are not register...

 

http://forum.delcam.com/viewtopic.php?f=51&t=12641

 

Do you mind if I upload it in a answer on this topic ? 

 

Alex 

 Auto%20complete.png

 


Hi Alex470,

go ahead, auto complete sounds very nice!

 

Regards,

Pekka.

Post 7 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-29-2016 03:37 AM in reply to: PekkaJLaasanen

 

I have modified the theme a bit as I prefer when I work with my macros to have a darker background. I am not sure about the text colour combinations but here you are:

 

Obsidian.JPG

 

When you load the file as Pekka described please remember to change the style to Obsidian.

 

Obsidian2.JPG

 

The drawback on the Obsidian theme with the dark background is that it does not work well with the compare feature.

If you want to compare files you have to change your theme.

 

Kind regards

 

George

 

 

Post 8 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-29-2016 06:36 AM in reply to: GBizas

Sorry the previous one will not work.

Here is the correct xml.

 

Obsidian.JPG

How can you delete one of your replies if it is wrong? In the old forum you could at least edit it...

 

King regards


George

Post 9 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-29-2016 07:07 AM in reply to: GBizas

As far as I have seen, you can edit your own message (Under options, top left of the message) as long as nobody answered it.

 

I agree with you, it's a little bit frustrating when you see a mistake too late.

 

Olivier

Post 10 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-30-2016 02:46 AM in reply to: PekkaJLaasanen

Hi,

 

So here is mine 

 

Step 1 :
Copy PowerMill Macro.xml to C:\Program Files (x86)\Notepad++\plugins\APIs
Copy userDefineLang.xml to C:\Users\Proprietaire\AppData\Roaming\Notepad++

Step 2 :
Launch Notepad++
Select Language --> PowerMill Macro

 

For autocompletion : 

 

When you are between ( ). Press escape to hide advices, and press CTRL + MAJ + SPACE to display advices.

I attached the files with this post in NpPlsPls_Macro.zip
 
Hope you'll enjoy
 
And if you want to add more autocompletion feel free to share what you have done :)

 

Alex

 

Post 11 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-30-2016 04:06 AM in reply to: Alex470

Alex470 wrote:

 

 

For autocompletion : 

 

When you are between ( ). Press escape to hide advices, and press CTRL + MAJ + SPACE to display advices.

 


Hi @Alex470 

 

what does MAJ mean?

______________________
Intel Core i7 5930K @ 3.5 GHz
NVIDIA Quadro K2000 2 GB
PNY 500 GB SSD
Corsair 32 GB DDR4 2666 MHz RAM
Windows 10 Professional 64-bit
Post 12 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-30-2016 04:47 AM in reply to: iamcdn79
 

Hi @Alex470 

 

what does MAJ mean?


 

Ctrl + Shift + Spacebar seems to work.

 

Thanks for the files Alex, it works fine.

 

Regards

Pekka.

Post 13 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-30-2016 04:47 AM in reply to: iamcdn79

Sorry I forgot to translate, it's "SHIFT

Post 14 of 17

Re: Notepad++ Language for editing PowerMill macros.

11-30-2016 05:13 AM in reply to: Alex470

Nothing happens when I do that

______________________
Intel Core i7 5930K @ 3.5 GHz
NVIDIA Quadro K2000 2 GB
PNY 500 GB SSD
Corsair 32 GB DDR4 2666 MHz RAM
Windows 10 Professional 64-bit
Post 15 of 17

Re: Notepad++ Language for editing PowerMill macros.

12-06-2016 05:52 AM in reply to: PekkaJLaasanen

Any one have any idea why none of these are working for me?  I have Imported them all and they show up at the bottom of the language dialog, and I tried updating notepad++ as well. 

 

When I select a language.. nothing happens at all.

Post 16 of 17

Re: Notepad++ Language for editing PowerMill macros.

12-06-2016 07:03 AM in reply to: PekkaJLaasanen

So I went back and removed all the languages I added (just the ones above that I tried)  and then went to the notepad++/plugins/APIs and deleted them out of there.

 

Then Imported them back in via the "define a language" dialog and now everything seems to work fine.  I think the problem was drag and dropping the files into the notepad++ folder instead of just importing them in.

 

 

Post 17 of 17

Re: Notepad++ Language for editing PowerMill macros.

02-10-2017 06:52 AM in reply to: PekkaJLaasanen

using version v7.3.1 

and i cant get it to import

keeps telling me it failed to import





Thanks
Bruce Green
never did nothing,
BUT
try always did

if I have caused you hard feelings it was not intended. But my intent is to get the most from whatever I do.
to all that have helped me get to where I am THANKS FOR THE KNOWLEDGE

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post