Notepad++ Language for editing PowerMill macros.

Notepad++ Language for editing PowerMill macros.

Anonymous
Not applicable
7,709 Views
29 Replies
Message 1 of 30

Notepad++ Language for editing PowerMill macros.

Anonymous
Not applicable

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

 

 

7,710 Views
29 Replies
Replies (29)
Message 2 of 30

Anonymous
Not applicable

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

Message 3 of 30

a1moldmaker
Advocate
Advocate

seems to work with powershape also...very cool

Bruce Green
Saying I cant always leads to failure
Saying I tried MIGHT lead to success
0 Likes
Message 4 of 30

Alex470
Enthusiast
Enthusiast

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

 

0 Likes
Message 5 of 30

Anonymous
Not applicable

Brilliant!!!

0 Likes
Message 6 of 30

Anonymous
Not applicable

@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.

0 Likes
Message 7 of 30

Anonymous
Not applicable

 

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

 

 

0 Likes
Message 8 of 30

Anonymous
Not applicable

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

Message 9 of 30

NanchenO
Collaborator
Collaborator

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

0 Likes
Message 10 of 30

Alex470
Enthusiast
Enthusiast

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

 

Message 11 of 30

iamcdn79
Mentor
Mentor

@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 i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 12 of 30

Anonymous
Not applicable
 

Hi @Alex470 

 

what does MAJ mean?


 

Ctrl + Shift + Spacebar seems to work.

 

Thanks for the files Alex, it works fine.

 

Regards

Pekka.

0 Likes
Message 13 of 30

Alex470
Enthusiast
Enthusiast

Sorry I forgot to translate, it's "SHIFT

0 Likes
Message 14 of 30

iamcdn79
Mentor
Mentor

Nothing happens when I do that


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 15 of 30

Anonymous
Not applicable

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.

0 Likes
Message 16 of 30

Anonymous
Not applicable

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.

 

 

0 Likes
Message 17 of 30

a1moldmaker
Advocate
Advocate

using version v7.3.1 

and i cant get it to import

keeps telling me it failed to import

Bruce Green
Saying I cant always leads to failure
Saying I tried MIGHT lead to success
0 Likes
Message 18 of 30

raffnecBNJ8C
Contributor
Contributor

Can you explain how to enable autocomplete and how it works?
I don't see autocomplete in notepad++ v.8.5.3 or I don't understand how to use it.

0 Likes
Message 19 of 30

nguyenthinhvt95
Advocate
Advocate

nguyenthinhvt95_0-1693463405086.png

How can I turn off the white board?,

I try to use Language by PowerMill Macro and dark theme and it 's look terrible.

 

0 Likes
Message 20 of 30

MitchPflederer
Advocate
Advocate

does anyone know how to set this up in visual studio code?

0 Likes