Script Error

Next
 From:  Sharif (SR13765)
4669.1 
Hi;

I have setup a shortcut key for "CurveLengthBeingDrawn" Script, I am getting this error message when I use any curve command. This happens for both version of MOI (v2 and V3beta)

Any Idea?

Thanks

Sharif
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4669.2 In reply to 4669.1 
Hi Sharif, it looks like that particular script on Petr's page got mangled - it's probably some of the HTML tags in the script itself are being seen as web browser content or something like that - anyway a little piece of the script is actually missing there.

Get the full script from the post here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=2703.12

and then that should work in both v2 and v3.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Sharif (SR13765)
4669.3 In reply to 4669.2 
Hi Michael;

Thanks, It worked with new script. I was wondering if this script can be modified to get the length of any curve after it has been drawn. For example, if I draw an ellipse and later on I want to find out the circumference of the ellipse; something similar to "List" command in Autocad.

-Sharif
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4669.4 In reply to 4669.3 
Hi Sharif - there is another script on Petr's page just above that other one which will let you get the length of a curve that has already been drawn:
http://kyticka.webzdarma.cz/3d/moi/#CurveLength

At some point in v3 I want to make a kind of extended properties dialog that will be able to contain a bunch of information like that in the UI.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  大道刀 (SUIYAN)
4669.5 In reply to 4669.4 
HI Michael
一个冒昧的请求:能否将CurveLengthBeingDrawn的代码改为将长度信息以弹出信息面板的方式呈现的脚本呢?或者能告诉我怎么做么?十分感谢!(A bold request: Could you please change the code for CurveLengthBeingDrawn to a script that presents length information in the form of a pop-up information panel? Or can you tell me how to do it? Thank you very much.)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4669.6 In reply to 4669.5 
Hi SUIYAN,

re:
> Could you please change the code for CurveLengthBeingDrawn to a script that presents
> length information in the form of a pop-up information panel?

Possibly but it's not completely clear to me what you want.

Could you please describe a bit more detail about the "pop-up information panel" ?

Do you mean something like the curve length that you can currently get in the detailed object properties dialog? :



- Michael

EDITED: 27 Dec 2024 by MICHAEL GIBSON

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  大道刀 (SUIYAN)
4669.7 In reply to 4669.6 
HI Michael
Like This

因为我在老旧电脑中仍需要使用支持32位系统的V3。CurveLengthBeingDrawn快捷键指令使用步骤有些复杂,容易与下一个操作指令重合,我想直接显示曲线长度信息。(Because I still need to use V3 that supports 32-bit systems on my old computer. The steps for using the CurveLongBeingDrawn shortcut command are somewhat complicated and can easily overlap with the next operation command. I want to directly display the curve length information.)
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4669.8 In reply to 4669.7 
Hi SUIYAN, try setting this up on a shortcut key:

script:var curves = moi.geometryDatabase.getSelectedObjects().getCurves(); if ( curves.length == 1 ) { var crv = curves.item(0); var len = crv.getLength(); moi.ui.alert( moi.ui.formatNumber( len ) ); }

That should pop up a message with the length of the selected curve and it should work on V3.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  大道刀 (SUIYAN)
4669.9 In reply to 4669.8 
Thanks Michael
我已将它作为脚本添加到V3中,并结合PointCoordinates、CVolume等脚本,完成了对v4 info——properties功能的大致替代效果。(I have added it as a script to V3 and combined it with scripts such as PointCoordinates and CVolume to achieve a rough replacement effect on the v4 info properties function.)






Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All