Is it time to work on Python scripts for V6?

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

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.

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

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.)

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

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.

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.

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

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.

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

Logged

Thanks

I’ll get back into this mid-summer.

So much to do, so little time!!

Dan

@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.