←  Technical Questions

nanoCAD forum

»

possibility to drag'n drop command scr...

Ronny Schneider's Photo Ronny Schneider 05 Apr 2016

Hi,
I was wondering if it possible to put the commands you can enter in the command bar at the bottom into a file and dragndrop that file onto Nanocad like it is possible in Autocad.
My old Autocad scripts look for example like that:

line
609756.3199,7549603.5950
609756.3453,7549603.5674

-layer
set
AB_Bolts_TextEast

text
609756.4456,7549603.5132
0.06
123.0359
0.3
-color
green
-layer
set
AB_Bolts_Arrows

line
609756.4017,7549603.7207
609756.3199,7549603.5950

line
609756.4017,7549603.7207
609756.3897,7549603.6852

line
609756.4017,7549603.7207
609756.3741,7549603.6953

-layer
set
AB_Bolts_TextNorth


And since the commands seem to be nearly exactly the same in Nanocad I was wondering if that would be possible as well. I'm a surveyor and I used that quite often to draft as built information in Autocad. For instance I've got a lot of hold down bolts. I have an Excel Spreadsheet with the design information on one side and the actual pickup location on the other side and an Excel macro is creating that simple script text file which I only had to dragndrop onto Autocad and it drafted me nicely thousands of little arrows and text's showing the deviation from design and the values, or drafted houndreds of Blocks at certain UCS positions. I used that text script dragndrop quite a lot in Autocad.
Shouldn't be that complicate to incorporate. Just have the command bar parse the text file and execute it line by line.
Quote

Hellen_V's Photo Hellen_V 11 Apr 2016

hello Ronny,
we can't find it in Autocad.
Contact Developers' Club, they will help you to realize your script.
Quote

Ronny Schneider's Photo Ronny Schneider 12 Apr 2016

It's definitely possible in Autocad. Every command you'd enter into the command bar you can write instead into a textfile which you just have to dragndrop onto the drawing screen and it will execute it line by line as if typing it into the command bar. Is quite handy at times and doesn't need any coding skills.

But anyway I wrote me a script that can interpret my Autocad scripts and draw the things in Nanocad. You didn't make my life easy with requesting ESCAPE to end the point function and STRG+ENTER to end the text function. For text I had late at night the enlightenment to use -text instead and add chr(27) to the string for the point escape issue.

By the way, the customization files here from the forum and from http://nanocad.com/page/Programming2 don't work on my laptop running Win10. No changes made to the example files. I copied them as told into the nanocad.exe folder which is in my case "C:\Program Files (x86)\Nanosoft\nanoCAD en 5.0\nCad.exe". That already needs Admin rights. So maybe there is already an issue with newer windows versions.
Quote

Hellen_V's Photo Hellen_V 19 Apr 2016

Hello Rony,
yes, it's possible that script from nanoCAD web-site won't work on Windows 10 with nanoCAD 5, this version was released in 2013 and we don't promise full compatibility.
Anyway, I advice you to contact Developers' club and blog, you can find more help information than here.
http://forum.nanocad...ad-development/
Quote