Is it time to work on Python scripts for V6?


#1

I’ve been holding off testing and re-working my scripts for V6 until the SDK is finished changing. Has that happened yet? Is it time to address scripts in V6? Or should I continue to wait?

Thanks,

Dan


(Steve Baer) #3

You shouldn’t have to “update” your scripts for V6. If something isn’t working correctly, it may be a bug that we need to fix.

I would say go for it.


#4

There should however be lots of new stuff (rs/RhinoCommon methods) available… --Mitch


(Steve Baer) #5

That is true, but none of that should break scripts written against V5 from running in V6. There are a handful of very obscure corners of RhinoCommon that changed enough to force updates to scripts, but I doubt anyone will notice (famous last words.)


#6

I just recall last time I tried almost nothing would run. That was last August. Methods like CurrentDimStyle would crash Rhino. I think anything related to dimensions would crash Rhino every time.

I’ll take another look within the next few weeks.

Thanks,

Dan


#7

Hi @DanBayn,

i am doing cross platform development and did not get crashes but occassionally deprication warnings, usually only on the first run of a script. I am not sure if i can disable them since it would be too much work to create extra code for V5 and V6.

c.


(Steve Baer) #8

Please do and let us know right away if you have any problems. The annotation/dimension stuff has gone through a lot of changes in the last few months, but it does appear to be settling down now.


#9

Here is one from V5 that crashes my V6 to the desktop when compiled in a plug-in. If I run it from the editor the traceback tells me what’s wrong, as it should. This is typical for any script I have that has to do with annotations. This is why I think there will be some effort required to port all my scripts to V6.

This script just changes arrow head sizes. So make a leader or dimension and give it a try in V6.

ArrowHeadSize.py (2.4 KB)

Thanks,

Dan


#10

Hi @DanBayn,

it looks like the RhinoScript syntax for V6 is looking for a CurrentDimensionStyle property in the dim style table which does not exist. In V5 there where two related properties:

CurrentDimensionStyle
CurrentDimensionStyleIndex

In the WIP the first seems not to exits and the second seems to be renamed to CurrentIndex.

@Alain, looks like an oversight in the RhinoScript syntax for the rs.CurrentDimStyle() method in V6 ?

c.


(Alain Cormier) #11

Yes, an oversight. Like Steve said, annotations have changed a lot and the api will be stable soon.

Logged

Thanks


#12

I’ll get back into this mid-summer.

So much to do, so little time!!

Dan


#14

@DanBayn, Ok, it seems there are more things missing. But i got your script to complete without errors making minor changes:

ArrowHeadSize_WIP.py (3.0 KB)

@Alain, there is also CommitChanges() used in rs.DimStyleArrowSize(), i got this to work in the example above using Modify

c.