.NET

Reply
Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 11 of 13 (211 Views)

Re: Issues with Intersecting AutoCAD 2010

04-16-2013 09:10 AM in reply to: DiningPhilosopher

I checked the databaseServices IntersectWith in my object browser, and I see that the last 2 arguments are Long, so I guess this means the 64-bit patch is required.

 

And this also means I'm stuck with the platformUtils.vb fix... for now, at least. Any idea why this method

 

PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(entity, args)

 

gives me a "System.Reflection.TargetParameterCountException: Parameter count mismatch" error? This is what I been trying to figure out, but it's kind of a trial and error thing for me, and nothing I've tried seems to work.

 

The error msg says that System.Reflection.RuntimeMethodInfo.Invoke() takes 5 arguments -> Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture

 

I'm at a crossroads on how to resolve this. It's been a long journey from filleting lines,only to end up patching up the IntersectWith method, and then getting stuck on the fix for IntersectWIth! But I feel I am almost at the journey's end.

 

Any suggestions on this parameter count thing?

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 12 of 13 (207 Views)

Re: Issues with Intersecting AutoCAD 2010

04-16-2013 10:28 AM in reply to: mindofcat

The VB.NET code was converted using Reflector and it didn't do a very good job with it, and there's no compiler error when built the code.

 

I updated the code on theswamp, and it should work, but you don't call those methods directly, you call the methods with the <Extension> attribute (as you originally tried), which you should be able to do via the Entity variable, or by prefixing their names with PlatformCompatiblityExtensionMethods.IntersectWith(....).

Valued Contributor
mindofcat
Posts: 55
Registered: ‎05-14-2012
Message 13 of 13 (203 Views)

Re: Issues with Intersecting AutoCAD 2010

04-16-2013 10:48 AM in reply to: DiningPhilosopher

DiningPhiloshoper, you're the best out there! 

 

Phew, finally this problem is resolved, your updated code took care of the parameter mismatch issue. All i had to do was replace this:

 

PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(Nothing, (BindingFlags.NonPublic Or BindingFlags.Static), Nothing, args, Nothing)

 

with this:

 

PlatformCompatibilityExtensionMethods.intersectWithMethod1.Invoke(entity, (BindingFlags.NonPublic Or BindingFlags.Static), Nothing, args, Nothing)

 

and the whole thing worked like a charm!

 

Thank you so much, DiningPhilosopher, my gratitude knows no limits for your patience, and all the help you accorded me in resolving this IntersectWith issue.


God bless.


Cat

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community