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: 

Notepad++ Language for editing PowerMill macros.

29 REPLIES 29
Reply
Message 1 of 30
PekkaJLaasanen
5078 Views, 29 Replies

Notepad++ Language for editing PowerMill macros.

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

 

 

29 REPLIES 29
Message 2 of 30

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

seems to work with powershape also...very cool

Bruce Green
Saying I cant always leads to failure
Saying I tried MIGHT lead to success
Message 4 of 30
Alex470
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

 

Message 5 of 30
GBizas
in reply to: PekkaJLaasanen

Brilliant!!!

Message 6 of 30
PekkaJLaasanen
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.

Message 7 of 30
GBizas
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

 

 

Message 8 of 30
GBizas
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

Message 9 of 30
NanchenO
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

Message 10 of 30
Alex470
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

 

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

Message 12 of 30
PekkaJLaasanen
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.

Message 13 of 30
Alex470
in reply to: iamcdn79

Sorry I forgot to translate, it's "SHIFT

Message 14 of 30
iamcdn79
in reply to: Alex470

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

Message 15 of 30
bradTV4B7
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.

Message 16 of 30
bradTV4B7
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.

 

 

Message 17 of 30

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
Message 18 of 30
raffnecBNJ8C
in reply to: Alex470

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.

Message 19 of 30

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.

 

Message 20 of 30

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

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

Post to forums  

Autodesk Design & Make Report