How to define LastCreatedObject

I’m trying to fillet two curves that have been offset through script and I’m having the hardest time defining them. Can I define them through the command LastObjectCreated and if so how would I go about doing that?

Hi Michael,

Can you post some of your code or a simplified version of it.
It’s much easier to give feedback if you provide some more reference

-Willem

if rs.IsCurve(b):
rs.OffsetCurve( b, [0,0,0], 1.0 )
c = rs.LastCreatedObjects(c)

This is what I’ve got so far. I just started trying to figure out python yesterday so any recommendations are greatly appreciated. :slight_smile:

Try this:

if rs.IsCurve(b):
    offsets=rs.OffsetCurve(b, [0,0,0], 1.0 )

If the offset actually worked, offsets will contain a list of the resulting curves. Otherwise it will be None.

i’m trying to fillet the resulting curves together. I can’t figure out how to do that without trying to define the resulting curves from the offset.

i used the new code and i didn’t get a list of resulting curves although the offset did work.

Works here on a quick test… The code above didn’t have the indent, sorry, I typed it directly into the post and forgot the spaces.

Thank you, the list isn’t popping up for me still and I don’t particularly know what I’m missing.

You didn’t read my code above, you need to set the output of rs.OffsetCurve() to something.

offsets=rs.OffsetCurve....

I think I showed the wrong part of the script

If you set breakpoints at the pass lines and run the script, what is inside the offsets variable?