Hi,
I am playing with the free version 5.0.
I created my toolbar and my command (hCH here). How do I link a icon to that button?
Regards,
John
1
Help to add an icon for a User Defined Button
Started by john wang, Jan 13 2022 11:20 AM
6 replies to this topic
#1
Posted 13 January 2022 - 11:20 AM
#2
Posted 15 January 2022 - 06:45 PM
Hi John.
Sorry, for not answering directly to your question.
Possibilities of this free version might not be enough for modern user.
In newer versions. like 21.0 etc you can add icons more easier.
For example: https://forum.nanoca...ibility-on-off/
Sorry, for not answering directly to your question.
Possibilities of this free version might not be enough for modern user.
In newer versions. like 21.0 etc you can add icons more easier.
For example: https://forum.nanoca...ibility-on-off/
#3
Posted 17 January 2022 - 12:05 PM
Artemio, on 15 January 2022 - 06:45 PM, said:
In newer versions. like 21.0 etc you can add icons more easier.
For example: https://forum.nanoca...ibility-on-off/
For example: https://forum.nanoca...ibility-on-off/
I remember it is through editing user.cfg file, but I can't find the cfg file now. Where is it stored on WIndows 10?
#4
Posted 17 January 2022 - 06:52 PM
All user interface described in "nCad.cfg".
You can find it there: C:\Program Files (x86)\Nanosoft\nanoCAD en 5.0.
Also I'd recommend to read:
https://forum.nanoca...-resursnoy-dll/
and
https://habr.com/ru/...ft/blog/239533/
Can't find versions in English, sorry.
You can find it there: C:\Program Files (x86)\Nanosoft\nanoCAD en 5.0.
Also I'd recommend to read:
https://forum.nanoca...-resursnoy-dll/
and
https://habr.com/ru/...ft/blog/239533/
Can't find versions in English, sorry.
#5
Posted 18 January 2022 - 12:15 PM
Artemio, on 17 January 2022 - 06:52 PM, said:
I have a mytest.bmp file.
mymenu.rc is:
MYTEST BITMAP "bmp\\mytest.bmp"
*Created a project named mynanomenu for .dll with VS2019
*Add mymenu.rc and mytest.bmp into the project resource
*After compiling, I got mynanomenu.dll
*Copy mynanomenu.dll into nanocad folder.
*Test my mynanomenu.dll, open nmenu.cfg, change Filet command to point to my icon like this:
[\configman\commands\fillet] weight=i30 |cmdtype=i1 |CapsDisable = W0xFF intername=sfillet |iconname=sSI172 BitmapDll=smynanomenu.dll BitmapId=sMyTest
Run nanocad, I can see my icon in front of Filet command.
#6
#7
Posted 22 January 2022 - 01:46 AM
Make two files: BlueCar.dwg & GreenCar.dwg
Save them under C:\MyBlocks
Save below code as MyBlocks.nsf file.
In NanoCad, load this nsf file. Then there will be two new commands: BlueCar & GreenCar.
Save them under C:\MyBlocks
Save below code as MyBlocks.nsf file.
In NanoCad, load this nsf file. Then there will be two new commands: BlueCar & GreenCar.
<?xml version="1.0" encoding="utf-8"?> <package> <command name="BlueCar" weight="30" cmdtype="1"> <script lang="VBS"><![CDATA[ Dim ms Dim ut Dim ptInsert Set ms = ThisDrawing.ModelSpace Set ut = ThisDrawing.Utility ptInsert = ut.GetPoint("0,0,0", "Specify an insertion point") ms.InsertBlock ptInsert,"C:\MyBlocks\BlueCar.dwg",1,1,1,0 ]]></script> </command> <command name="GreenCar" weight="30" cmdtype="1"> <script lang="VBS"><![CDATA[ Dim ms Dim ut Dim ptInsert Set ms = ThisDrawing.ModelSpace Set ut = ThisDrawing.Utility ptInsert = ut.GetPoint("0,0,0", "Specify an insertion point") ms.InsertBlock ptInsert,"C:\MyBlocks\GreenCar.dwg",1,1,1,0 ]]></script> </command> </package>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users