.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cann't Get VB.Net to Work with AutoCAD 2010

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
678 Views, 11 Replies

Cann't Get VB.Net to Work with AutoCAD 2010

Sorry to post so soon after joining, but I'm not seeing a FAQ and I am finding it slow to browse all the postings.

I'm hoping someone will say this is a simple fix. Any suggestions would be much appreciated. Summary of problem follows:

Got this message when opening one of the Autodesk Lab projects. I am adding this after I got the other errors regarding security realizing that this message may point to the solution. This message did not come up when the project was in the VS2008/projects folder.

See attached for image

Got this error when first running the “hello world” Lab1 from the .Net ARX Training Pacakge

See attached for image

Visual Studio also showed errors, some are shown below:
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='NaN' BindingExpression:Path=Source.MinimumWidth; DataItem='ToolBarControl' (Name=''); target element is 'ToolBarControl' (Name=''); target property is 'MinWidth' (type 'Double')
System.Windows.Data Error: 39 : BindingExpression path error: 'BackgroundOpacity' property not found on 'object' ''ContentPresenter' (Name='PART_CustomizeButtonInMainPanel')'. BindingExpression:Path=BackgroundOpacity; DataItem='ContentPresenter' (Name='PART_CustomizeButtonInMainPanel'); target element is 'SystemDropShadowChrome' (Name='Shdw'); target property is 'Opacity' (type 'Double')
System.Windows.Data Error: 39 : BindingExpression path error: 'Current' property not found on 'object' ''QuickAccessUndoControl' (HashCode=11709955)'. BindingExpression:Path=Current; DataItem='QuickAccessUndoControl' (HashCode=11709955); target element is 'ContentPresenter' (Name=''); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 39 : BindingExpression path error: 'Current' property not found on 'object' ''QuickAccessRedoControl' (HashCode=230999)'. BindingExpression:Path=Current; DataItem='QuickAccessRedoControl' (HashCode=230999); target element is 'ContentPresenter' (Name=''); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='NaN' BindingExpression:Path=Source.MinimumWidth; DataItem='InfoToolbar' (Name='InfoCenter'); target element is 'InfoToolbar' (Name='InfoCenter'); target property is 'MinWidth' (type 'Double')
……

Installed all the ARX wizards from the ARX SDK (searched the SDK for “.msi”). Uninstalled and reinstalled to make sure where they go.
Removed VB.Net express and AutoCAD 2010 leaving ACE and VS with VB.Net.
11 REPLIES 11
Message 2 of 12
chiefbraincloud
in reply to: Anonymous

Check this post for how to configure the code access security policy for loading from a network location:
http://discussion.autodesk.com/forums/click.jspa?searchID=9957310&messageID=6113683
I am not sure if that has anything to do with your other Binding Expression errors, but it might.
Dave O.                                                                  Sig-Logos32.png
Message 3 of 12
Anonymous
in reply to: Anonymous

I've moved everything to run on my local machine and I still get these binding errors.
I started a new project using the Application plug in template, saved it and then ran in debug mode... same result before I even do a netload in AutoCAD these BindingExpression path error: messages appear
In reading another post where reinstalling AutoCAD eliminated some problems that sound similar to this, I might try this next..
Message 4 of 12
Anonymous
in reply to: Anonymous

I forgot to mention that I did look at your advice on getting code to run on client machines. I squirreled this away for when I need it later. Thanks.
Message 5 of 12
william.chandler
in reply to: Anonymous

to remove the second error set all references capoy local to false
Message 6 of 12
Anonymous
in reply to: Anonymous

copy local was set to false. The jpg attachment shows this. I couldn't figure out how to just post in this message.

Message 7 of 12
Anonymous
in reply to: Anonymous

I haven't reinstalled AutoCAD.... yet....
Instead I tryed cleaning things up after noticing I had 2 different copies of AutoCAD and both the Express and Studio Pro Visual Studio versions installed.
I had both AutoCAD 2010 and AutoCAD 2010 Electrical installed. Electrical is what I wanted and so uninstalled the standard version.
I removed the VB.Net Express program.
Then I removed the templates created by the ARXWizards.msi and the AutoCAD 2010 dotNET Wizards.msi by running both these programs and uninstalling them. Finally I re ran the AutoCAD 2010 dotNET Wizards.msi to install the VB.net template.
Bottom line: Now I get "Exception in vaac_service.arx ARX Command" with an "Unhandled Exception at address " when I run the debugger.
I am back to thinking that I need a do over, unless someone has another suggestion.... Edited by: HEnnulat on Oct 6, 2009 6:15 PM
Message 8 of 12
chiefbraincloud
in reply to: Anonymous

I have not yet made the switch to VS2008/ACAD2010, so I can't be sure, or even check for myself, but could it be that you are targeting the .NET framework 2.0, instead of 3.5?
Dave O.                                                                  Sig-Logos32.png
Message 9 of 12
Anonymous
in reply to: Anonymous


I did not know you can target or preference one dot NET framework over another! Wouldn't this be automatic? If not, how is this targeting done?

Edited by: HEnnulat on Oct 7, 2009 8:48 AM
Message 10 of 12
Anonymous
in reply to: Anonymous

I posted 2 of the same messages and am trying to delete this one, but so far am unsuccessful.
Message 11 of 12
Anonymous
in reply to: Anonymous


I think it's working! ! ! !
After doing all the clean up I rebooted my machine after noticing it froze on all my open Word documents. This morning it all worked..... at least so far going into the first part of the the Lab 2 exercise in the dotNet training package....
I did read that the debug dll should be picked from the /bin/debug folder... I had been picking it from the /obj/debug folder. Anyone know if this matters? The first time I ran the helloworld lab, I ran this from the /obj/debug directory...
I still get a lot of "Binding" Errors in the VS2008 Immediate Window, However Stephen Preston (from Autodesk) sent me an email stating:
"You should treat the System.Windows.Data messages as warnings and not errors (even though the warning message says ‘error’). They’re not even compiler warnings – they come from some of the AutoCAD .NET components, and are handled by AutoCAD. If your only remaining problem is that you see those messages in the output window when you launch AutoCAD from your debugger, then you don’t have a problem."
Fuslogvw confirmed that indeed everything worked fine by reporting that
"The operation was successful.
Bind result: hr = 0x0. The operation completed successfully."
So that's it then. Unless I run into problems on this topic again I don't think I'll be adding anything else. I have email alerts turned on, so if anyone comments I'll still be checking.
Thanks Chief and Bill for your input.

Message 12 of 12
Anonymous
in reply to: Anonymous

The recommendation is to use the acmgd.dll and acdbmgd.dll reference files located in the SDK and to not use the ones in the AutoCAD root directory.

This is per the AutoCAD.Net developers Guide (http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html).

Quoting from this guide it notes:
"NoteThe DLLs in the ObjectARX SDK are simplified versions of the same files that ship with AutoCAD, as they do not contain dependencies on the AutoCAD user interface. It is recommended that you download and install the ObjectARX SDK, and then reference the DLL files that come with the SDK instead of those that are found in the install directory of AutoCAD 2010. "

I did not realize this mattered. Again not sure if this made a difference, but I did change the reference from the AutoCAD root directory to the copy in SDK when I was successful today.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost