Parameter must be a Guid or string representing a Guid

Blockquote

import rhinoscriptsyntax as rs

ml=[]
sd=1500
cor=x

while sd>10:
   for i in range(1,999,1):
       param1=i/1000
       fl=rs.TrimCurve(cor,(0,param1),False)
       sl=rs.TrimCurve(cor,(param1,1),False)
       flfp=rs.CurveStartPoint(fl)
       flsp=rs.CurveEndPoint(fl)
       fll=rs.AddLine(flfp,flsp)
       fcm=rs.CurveMidPoint(fl)
       flm=rs.CurveMidPoint(fll)
       fd=rs.Distance(fcm,flm)
       slfp=rs.CurveStartPoint(sl)
       slsp=rs.CurveEndPoint(sl)
       sll=rs.AddLine(slfp,slsp)
       scm=rs.CurveMidPoint(sl)
       slm=rs.CurveMidPoint(sll)
       sd=rs.Distance(scm,slm)
       if fd>10:
           ml.append(fll)
           cor=sl
           break

ml.append(sll)
a=ml

Blockquote

ERROR

Runtime error (TypeErrorException): Parameter must be a Guid or string representing a Guid

Traceback:
line 890, in coerceguid, “C:\Users\Emreistikam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\utility.py”
line 995, in coercecurve, “C:\Users\Emreistikam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\utility.py”
line 2153, in CurveStartPoint, “C:\Users\Emreistikam\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\curve.py”
line 22, in script

Use three backticks ( ``` ) before and after your code to paste in with indents.

My result from a 52mm long open curve was getting a 0.03mm length curve, it seemed to work. Can anyone explain why a print statement print f1 on line 21 doesn’t work? Does this imply a failure and None being returned?

Most likey one of the functions that generate the data needed for the function on line 22 failed. In this case probably f1 is None because your TrimCurve function on line 21 failed.

actually the main problem is about being guid or not

Because when tried this before using while

mean: for after that

x=sl

than for again.

when first for running there’s no error comes

but second for is fail.

So I think problem is return value

Whe I put input a panel it says “referenced planar curve”
output says “planar curve”

jmaybe this is the problem but I couldn’t fix

Files attached in double post: Parameter must be a Guid or string representing a Guid

why did you do that
just delete old post

@harunaydin instead of creating new posts, edit or reply to your existing post if it is the same topic. In this topic there are already a few replies.

@nathanletwory
If you take a look the replies you’ll see they are not solving anything and this causing by explanation so I did explain again

Explaining again is fine - in the same thread.

What if my post goes back without being unsolved

You have to wait patiently for someone to answer. It has not been even a day.

Hi every one, is there any solution for above highlighted issue??? it was all ok with me. but when i updated the rhino. then the problem mentioned above start.
kindly suggest the solution

Perhaps you should post the code that isn’t working for you…

– Dale