SketchLine Object causes AddByProjectingEntity to throw exception.

SketchLine Object causes AddByProjectingEntity to throw exception.

Anonymous
Not applicable
776 Views
15 Replies
Message 1 of 16

SketchLine Object causes AddByProjectingEntity to throw exception.

Anonymous
Not applicable
This code worked fine in Inventor 2008 however when i call this function is 2010 an Invalid Args Exception is thrown when a SketchLine is passed in. Anyone know whats going on here? asmsketch is a PlanarSketch object.

{code}
for (int j = 1; j <= asmsketch.SketchLines.Count; j++)
{
cutSketchProxy.AddByProjectingEntity(asmsketch.SketchLines);
}
{code}

Edited by: shouston on Oct 28, 2009 8:55 PM Edited by: shouston on Oct 29, 2009 1:13 PM
0 Likes
777 Views
15 Replies
Replies (15)
Message 2 of 16

Anonymous
Not applicable
Is asmsketch a sketch in the assembly or a sketch within a part?

Sanjay-
0 Likes
Message 3 of 16

Anonymous
Not applicable
asmsketch is a sketch in the assembly.
0 Likes
Message 4 of 16

Anonymous
Not applicable
I was able to verify that there is indeed an issue projecting assembly
sketch entities using the API. I've filed this with a high priority in our
system. Unfortunately, I don't know of a workaround. Sorry.

Thanks for reporting this.

Sanjay-
0 Likes
Message 5 of 16

chuck_b
Enthusiast
Enthusiast
Sanjay,

Any update on this topic? We will not be able to upgrade to 2010 until issue is resolved. A part can project it's sketch geometry two another part's sketch in an assembly only if it is one level deep. Deeper than that it doesn't work in 2010. No issues with Inventor 2008 when projecting sub assembly parts geometry to other sub assembly parts. Our findings have nothing to do with assembly sketches. We are using part sketches only. I can provide sample vba code and Inventor files to help identify problem.

Thanks,


Chuck

Edited by: Chuck_B on Nov 16, 2009 9:35 PM
0 Likes
Message 6 of 16

Anonymous
Not applicable
We did have this issue of not being able to project entities if they are
more than one level deep. But I thought the issue was resolved in Inventor
2010. Could you please provide data files and VBA code to reproduce?

thanks,
Sanjay-
0 Likes
Message 7 of 16

chuck_b
Enthusiast
Enthusiast
Should be able to open proj1.iam and run code. We tested this also one level deep and it worked on 64bit machine Inventor 2010 sp1 but not sub levels. Works good with 2008 as I mentioned. Sorry about the messy code. I had to quickly make something simple

Thanks for any help you can provide.

Chuck

{code}
Dim a As AssemblyDocument
Dim occ1 As ComponentOccurrence
Dim occ2 As ComponentOccurrence

Set a = ThisApplication.ActiveDocument
Set occ1 = a.ComponentDefinition.Occurrences(2).SubOccurrences(1)
Set occ2 = a.ComponentDefinition.Occurrences(1).SubOccurrences(2)

Dim odoc1 As PartDocument, odoc2 As PartDocument

Dim oSkToProjectOn As PlanarSketch

Dim oSkToProjectOnProxy As PlanarSketchProxy

Set odoc1 = occ1.Definition.Document

Set odoc2 = occ2.Definition.Document



Dim oCirc As SketchCircle, oCircProxy As SketchCircleProxy

Set oCirc = odoc2.ComponentDefinition.Sketches("Sketch2").SketchCircles(1)

occ2.CreateGeometryProxy oCirc, oCircProxy



Set oSkToProjectOn = odoc1.ComponentDefinition.Sketches("Sketch2")

occ1.CreateGeometryProxy oSkToProjectOn, oSkToProjectOnProxy





oSkToProjectOnProxy.AddByProjectingEntity oCircProxy

{code}

Edited by: Chuck_B on Nov 17, 2009 1:20 PM Edited by: Chuck_B on Nov 17, 2009 1:29 PM
0 Likes
Message 8 of 16

Anonymous
Not applicable
Yes, I'm afraid I'm able to reproduce the issue. I've added this workflow to
the previous report and given it a even higher priority. Please use the ID
1271172 for tracking purposes.

Thanks for reporting this.

Sanjay-
0 Likes
Message 9 of 16

chuck_b
Enthusiast
Enthusiast
Thanks Sanjay,

Any guestimate about how long this could take to fix? I know it is almost impossible to determine. 2-4 months or even less if it is a high priority item?

Thanks,

Chuck
0 Likes
Message 10 of 16

Anonymous
Not applicable
Sorry, I'm unable to comment on the timeframe of a fix.

Sanjay-
0 Likes
Message 11 of 16

chuck_b
Enthusiast
Enthusiast
Is there a way to track this issue ID 1271172 ? Or is this to be used when referencing purposes only?

Chuck
0 Likes
Message 12 of 16

Anonymous
Not applicable
No, there isn't a way to track it. You can post the id on the newsgroup, and
one of us here at Autodesk can look it up for you.

Sanjay-
0 Likes
Message 13 of 16

ludesroc
Advocate
Advocate
Any developpement on this post?

Regards,
Ludesroc
Ludesroc
0 Likes
Message 14 of 16

ludesroc
Advocate
Advocate
Any developpement on this post?

Regards,
Ludesroc
Ludesroc
0 Likes
Message 15 of 16

Anonymous
Not applicable
This issue should be fixed in the just released Inventor 2011. A fix is also
being considered for service packs of previous versions of Inventor, but no
final word on that yet.

Sanjay-
0 Likes
Message 16 of 16

ludesroc
Advocate
Advocate
Ok thanks Sanjay.

Ludesroc
Ludesroc
0 Likes