- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'd like to understand better how one can use the sketch.copy function. What I'm doing in my script is letting a user select a face on a sketch, and then I want to copy and paste that sketch in multiple other sketches, optionally using the Matrix3D transformation to scale it. My code uses
to let someone pick the profile. From there, I can get the entity of selFace, which itself is of type adsk.fusion.Profile.
From the profile, I can get the sketch containing the profile.
Later, I'm basically calling sketch.copy using the profile's parent sketch, so it's like this:
The problem is that I keep getting
RuntimeError: 3 : invalid input in sketchEntities
depending on what I put in for **something**. The API calls for an ObjectCollection there, and so I create a new ObjectCollection and add the selected profile to it.
I figure I'm either adding the wrong kinds of objects to the ObjectCollection, or I'm adding the wrong instances of objects to it -- because, I presume they must be entities that belong to the parentSketch in some way.
What's the right way to do this? Given a sketch and a selected profile, how should I construct the ObjectCollection so that parentSketch.copy will work?
Solved! Go to Solution.