Half cut Notcher by Pascal gives error in V7 when as button

Hi,
V7
what have I done wrong in turning this .rvb code into a button, as it gives error.
Pascal half cut notches error message v7

The code I have is this, (tried uploading word doc then rtf and neither allowed.)

see attached txt file instead.

and here in red removed, green added.
script added and deleted Notcher

following example of ToggleSelectioHighlights by Gijs deZwart

I also added the ) at the end.

Pascal Notcher code.txt (5.3 KB)

Steve

Hello- do you think maybe you could just attach a file instead of dumping all the code into your message?

-Pascal

As said I tried attaching it as word doc, wont alow, then as rtf, wont allow.
I had colour coded the bits I wanted to show what I added then deleted, txt file disallows any colour.
I shall attach as text but text doesnt allow bold or italic ?

how do I attach a colour marked up file ?

Steve

Steve, I recommend adding just references to the scripts, not paste entire scripts in buttons, see my other post.

Hi,
@Gijs
I was being told that anything siTting on a drive can be lost then button doesnt work, so to paste it within the button, and was working to the suggested wiki article on doing so,
@Helvetosaur

was all about this being best way. So now it isnt best way.

For all of these reasons, I recommend manual installation of scripts as outlined on this wiki page:
https://wiki.mcneel.com/rhino/macroscriptsetup

If its about posting in a thread, How do I reference a script that was made for me, or so I recall, if I say see Notcher, can people see the script ?

I needed it for building an aircraft, I recall it was made for me, I may be wrong.

Please explain how I reference a script in a thread here…

even then I am wanting to show what I have persoanlly done to it to get it to be ok in a button, prefixing it and deleting out bits as per your example, I need to show what I have done, so need to post the script somehow. and show the bits added and deleted. How do I do that ?

I am new to scripts so unfamiliar with how they can be shown, especially how to show my personal coding.

How do I reference my own coding for folk ?

I am spending a day making nice buttons for scripts that dont run, then being told to store them (scripts) on a drive instead as I used to, so I am totally lost now as to what is best to do.

Steve.

did you see my reply to your other post?

Yes,
I am following Helvetosaurs advice to avoid broken references, and keep scripts within button, ditto wiki article.
@Helvetosaur
So what have I done wrong with this code ?

Steve

One thing I see is that it seems like V7 does not support the ‘Private’ statement, at least as I used it 10 yeatrs ago… I’ll see what I can find out.

-Pascal

Hi Pascal,
I have got some of your scripts worlking, and have yet to install these below, except ConeByAngle which as per post causes error.

might these others be likewise afflicted.

Here they are.
SomeLayersOn.rvb (1.3 KB)
Turn off layers for unselected objects.txt (587 Bytes)

then this one
SelPlanar.rvb (1.5 KB)
called is surface planar

and this
ConeByAngle.rvb (885 Bytes)

Regards

Steve

ConeByAngle should work - drag and drop it to load. However it is lame, I’ll make one in Python.

-Pascal

Hi,
@pascal

I have again tried the Notcher, this time drag and drop, I get this error when running it by typing Notcher as a command line entry, I select the item then the gap then the adjoining one both to be notched and get error. :-

Pascal Notcher error with drag and drop method

I have all other codes running now, .py, .rhp and .rvb and those mentioned

SomeLayersOn.rvb…drag n drop then works as button runs command.
Turn off layers for unselected objects…SomeLayersOn.rvb button runs command
SelPlanar.rvb a batch of commands, noted in word doc crib sheet keywords, all work
ConeByAngle.rvb works button runs command.

…but cannot backup PC declaring V7 with buttons and codes working with notcher failing. I must continue again my win10 build, its been 5 weeks now and my Rhino V7 horse is still refusing to jump the fence,

All race goers have gone home !

What is wrong with Notcher ? ( a horse called Notcher ! )

Notcher.rvb (5.7 KB)

Steve

Hi
@pascal
@Gijs
@Helvetosaur
@jeremy5

Hi Anyone, can a clever coder fix the indicated error on line 41 char2.
If I try, it wont work, thats for sure.
:grin:

I can then proceed again with win10 build.

117 folk look like they might fancy this gizmo by Pascal.

Steve

@Steve1 well you messed with the original script so what did you expect :wink:

Not on a computer right now but in your code you commented out Call Notcher. Move that right in front of Sub Notcher, uncomment it and try again.

Hi,
I have taken the Notcher.rvb and drag dropped to V5, then typed notcher into command line and it still errors. during selection.

It was written for me and others found it useful.

I had finished the job before it came. I used offset cutter blocks.

so its not me. 'twas like it before I installed it.

Nice tool if it works.

Steve

Did you try my suggestion?

Hi, asking me to alter code is not a good idea.

I have a code never touched by me at all, the part with the Notcher is this part…

Call Main()
Sub Main()

'Call Notcher()
Private OldClear

If isEmpty(oldClear) Then
oldClear = 0

End If

Sub Notcher()

Dim P1, P2
Dim aP, aUsed(), n
n = 0

and here is me interpreting what you ask for:-

Call Main()
Sub Main()

Private OldClear

If isEmpty(oldClear) Then
oldClear = 0

End If

Call Notcher()Sub Notcher()

Dim P1, P2
Dim aP, aUsed(), n
n = 0

Bound to be wrong, but done literally
and a Syntax error happens.

Steve

Sorry I gave some wrong info. I need to look into this on a pc tomorrow (it’s late here 1 am)
I do see in another thread that Pascal mentioned something is wrong with the Private statement in Rhino 7, so this could be well the issue.

Hi, ok,
but if it errors when drag n drop to v5, and run from command line, it cant be due to any coding within, esp as I havent touched the original .rvb file.

It is DOA.

Steve

Latest one is Best way to cut half slots for a lattice of 15mm mdf? - #29 by pascal

Is that the one you tried?

Hi,
No or perhaps yes !
I recall it was sent me, for my aircraft build.

but in this thread there it is again, and folk getting errors !

here is the file I received.
Notcher.rvb (5.7 KB)

and I have found something interesting, If one has two objects , two thin slabs made with box tool, and lay them together in the final notched and glued together configuration, then run the command in V7, it notches them !

do the same in V5 and an error still occurs
Pascal Notcher new error V5

and moving the two blocks aside they are in bits.

I now download the file later in that thread, I drag drop to V5, run the command Notcher and yet again it errors.
Pascal Notcher new error and another V5

Clearly the code is wonky !.

I then try the 1st notcher again that just worked fine in V7 when objects are in final glued together configuration, creating two new objects , and this time it errors !

so truly wonky !
@pascal

Steve