AutoCAD Inventor :: 2011 Add-In - How To Release Document Object Correctly
Jan 26, 2012
I've created a Inventor 2011 Add-In using VB.Net with VS2008.
This add-in does all kinds of things, but it will not release some documents.
Well I don't know that for shure but it looks like that.
We use Productstream Pro and when changing state of a document it says the document is in use while there are no documents visibly open in Inventor. This only occures when I use my add-in.
Exact steps: Load drawing document from PSPPerform action with add-in which gets a custom iProperty from the Part file used on the Drawing and fills the display name of the Drawing with itSave the drawingClose the drawingIn PSP try to change state of the part file used on the drawingGet message from PSP stating the part is in use
In my code I've tried some things to prevent this behavior but non of them work.
I've tried:
Setting unused objects to "= Nothing"Releasing objects using "Marshal.ReleaseComObject(obj)"Calling "m_inventorApplication.CloseAllUnreferencedDocs()" and "System.GC.Collect()" on the "m_appEvents_OnTerminateDocument" event.
View 2 Replies
ADVERTISEMENT
Mar 27, 2012
I have made a VB.Net Add-In for Inventor 2011, in a few functions it opens one or more files or sets a reference to already opened files. The release of the resource to this documents seems to be the problem.
In PDM (Productstream Pro) we want to change document states and there for the documents have to be closed in Inventor. When using some Add-In functions prior to the state change in PDM, we get a message from PDM that Inventor still has the files open but inventor does not show any open files (of course we can not see files that were opened in the background).
Only manual operation to solve this is to close inventor or open the drawing and the part used on the drawing and close them top down (drawing first, then part).
I'm stuck with open files that don't seem to be open.I think this is because the add-in sets a reference to the part used on the drawing and then changes something in the drawing.How do I release the resources correctly?
View 2 Replies
View Related
May 27, 2012
When I close a large document Photoshop does not release the memory. If I open another document the program is slow and not resposive. If I close out of Photoshop and restart it then load the other document it is quick and responsive again.
View 12 Replies
View Related
Sep 7, 2012
My goal is to be able to store any object type (mainly an image jpg/bmp) inside a part that is not accessable through the normal user interface to be used with my addin.
I have been searching around and it seems like GetPrivateStream is the way to go.
Any working example of GetPrivateStream in vb.net and confirm if it actually stores the data inside the part.
I can't find a solution anywhere or any decent referencing material for this. If there is a better method of achieving this?
View 9 Replies
View Related
Apr 22, 2013
Just started using autocad 2013 this weekend and was able to create a document and draw some rectangles with specific dimensions for a project I'm working on. The idea is to print it out and cut the rectangles out on a piece of foam board.
So I printed it out but all of the rectangles are crazy small. Like 50% smaller. I checked the objects and they're all showing as being the right size. Then I realized the background grid is the 8.5 x 11 landscape paper and that my rectangles were to scale of the printout but not 1:1 of the dimensions that I entered and the objects said they are.
View 9 Replies
View Related
Oct 3, 2008
This code works with no errors but does not change the text size. A user can over ride the text size (Font size) so I'm hoping it is possible thru code.
Dim oSketch As Inventor.Sketch
Set oSketch = oPartDoc.ComponentDefinition.Sketches("Sketch1")
Dim oText As Inventor.TextBox
Set oText = oSketch.TextBoxes.AddByRectangle(pnt1, pnt2)
oText.Style.FontSize = 0.1
View 3 Replies
View Related
Oct 8, 2012
explain the circumstances where 'Release' is applied to a beam (node?) when using the Frame Analysis tool.
View 1 Replies
View Related
Jul 22, 2012
I tried to call COM object created by C# from other C# module.
I did:
1. Create simple COM object by C#
2. Register it
3. Try to call this COM from other C# console application - it works fine
4. Create simple AutoCad module by C# with IExtensionApplication
5. Try to call this module from AutoCAD - it works
6. In Initialize() method I wrote:
Type myClassAdapterType = Type.GetTypeFromProgID("CoreAdapter.CoreAdapterClass");
acDoc.Editor.WriteMessage("Type is OK: {0}", myClassAdapterType.FullName);
object myClassAdapterInstance = Activator.CreateInstance(myClassAdapterType);
acDoc.Editor.WriteMessage("Created");
6. Open AutoCAD again
7. Load my module
8. I saw "Type is OK" (becase it was registered in registry)
But I can't create instance.
View 1 Replies
View Related
Nov 22, 2013
I have two identical computers (dell 745's) running windows 7 and Autocad 2012 (64bit). on one machine opening a drawing which has is a linked OLE document everything displays properly. On the other machine the same drawing is opened and only the top 1/4 or so of the OLE document is displayed in the area allocated to the OLE.
This drawing also displays correctly on a HP laptop running win 7 and autcad2012.
I have dumped the variables from all three machines using setvar and copy and pasting and can see nothing that is different between the machines.
I've used this method a lot in the past using acad2008/win xp pro and did run into a file occasionally the would mess with the OLE but it's been limited to one file once in a while. Now since I've upgraded this one machine refuses to handle any OLE's. I like the editing commands in word better the the limited commands in AutoCAD tables or Exel for that matter.
What variable or settings affect ole's?
View 1 Replies
View Related
Sep 27, 2010
I am having trouble installing the "AutoCAD Architecture-MEP Object Enabler for AutoCAD LT." Whenever I try to install it, I immediately get a screen that says, "Setup was unable to detect any target applications for AutoCAD Architecture-MEP Oblject Enabler for AutoCAD LT." I have tried restarting the computer, running the install program with LT on and off, etc.
View 9 Replies
View Related
Jul 19, 2011
i'm using the following code (generic) to interface with AutoCAD; not including the version because my company upgrades every year...
Private AutoCAD_Instance As Object
AutoCAD_Instance = CreateObject("AutoCAD.Application")
When I try to run this, I get an error 'Unable To Create ActiveX Component'...
View 1 Replies
View Related
Feb 24, 2011
When I select an object to move I am unable to snap to the grips of the object or any other object close or any intersections. I have double and triple checked my osnap settings. Also, If I select a circle to move I am unable to select the center of the circle through additional osnap settings. One last issue, If I select an object and do a copy with base point command, I am unable to select a definitive base point. No grips or intersections show up.
My co-workers are able to do these functions but I am not.
View 2 Replies
View Related
May 9, 2011
I am looking for the perpendicular function specifically. However, at this point I can not find the tool bar for any of the snap functions.
View 3 Replies
View Related
Feb 11, 2013
I tried to print thisdrawing.modeldocument in a vba sub, but it doesn't work.
View 4 Replies
View Related
Sep 15, 2011
I am not seeing a oe for raster design for Map 3D 2011. We need to attach ECW ortho images.
View 2 Replies
View Related
Apr 12, 2012
A co-worker tells me when he opens a drawing then minimizes it and then opens a new drawing to fiddle around with, when he closes it and doesn't save and returns to the first drawing, when he runs commands he gets "No Null Object" errors. He can click OK or whatever on the error messages and continue, but they constantly fly in his face.
He's running AutoCAD 2011 Maps 3D x32 on Windows 7 x64.
View 3 Replies
View Related
Mar 19, 2012
I've been trying to get the Raster Design Object Enabler for Civil 3D 2011 64 Bit to install, but every time I run the exe it says there is no target application to be found, even though Civil 3D 2011 64 Bit is quite clearly installed on the machine.
View 8 Replies
View Related
Mar 28, 2012
I am trying to write a script that will automatically hatch several drawings. The drawings contain an area in which there are several objects that need to be hatched. For each drawing the objects vary in location within the one area.I figured I would set up my script to encompass the area with the object select hatch technique. This works fine if the objects in the area have no Islands. However when an object within the "object select hatch area" contains Islands it shades the whole object ignoring the Island or if it does recognize an island it will create an individual hatch for it.
However when I use the pick internal point method the hatch comes out as expected for the object with the Islands in it.
View 5 Replies
View Related
Mar 20, 2011
Max 2011, Mental Ray and mR Sun.
One of the objects in my scene is not rendering correctly. It is a side panel grating with holes in it. In the viewport it looks fine, but once I render it only some of the holes display. I created the front grating with the same method and it renders every hole just fine.
View 5 Replies
View Related
Jun 26, 2001
The following code produces a run time error:
"Failed to get the Document object"
Public AcadApp As AcadApplication, AcadDoc As AcadDocument
Set AcadDoc = AcadApp.ActiveDocument
AcadApp.ActiveDocument = AcadDoc
why?
View 9 Replies
View Related
May 8, 2012
using System;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.Interop.Common;
using Autodesk.AutoCAD.Interop;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.EditorInput;
[code]....
Working Environment:-
Visual Studio 2010AutoCAD 2011 C#
After run following error will occure
"An unhandled exception of type 'System.TypeLoadException' occurred in mscorlib.dll
Additional information: Method 'CopyTo' in type 'Autodesk.AutoCAD.ApplicationServices.DocumentCollection'
from assembly 'acmgd, Version=18.1.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation ."
View 2 Replies
View Related
May 24, 2011
When I use select object, it never displays the marquee correctly. One of two things will happen.
It will
1. Not even display the marquee at all e.g. I use select object by rectangular selection and the rectangle marquee box is invisible (although I can still select things)
or
2. If the marquee does display it shows it behind the objects, instead of in front of them, as scene in the image below.
View 2 Replies
View Related
Jul 10, 2013
I want to insert a word document with several pages in autocad by the OLE OBJECT function. The problem is the insert only the first page. How to follow the other pages?
View 9 Replies
View Related
Jun 28, 2012
MEP 2013
Can you export an OLE object from a DWG back to an Excel file/document?
View 1 Replies
View Related
Feb 21, 2014
I created a closed object that had a Bezier curve as part of it's definition. I wanted to scale it by 110% and then use this second enlarged object to create a sort of a background underneath the first object to create a sort of a shadow effect. But rather than the second object being uniformly larger than the first it intersects the original object in ways that don't make sense to me.
Is there an easier/differnt way to create an effect like this? I can do it but have to manually adjust a lot of points in the new object so that they create a uniformly larger version of the original object but it's a lot of effort for something that works fine for normal polygons with straight lines (e.g. a star with 5 points).
i've attached an image of what I get with this technique of creating two examples of two objects one a 110% scale version of the other. The first star shows the effect I'm trying to get and the second shows the problem (the red border does not surround the black object uniformly around the perimeter)
View 19 Replies
View Related
Apr 3, 2012
Is there any way to put the 2011 topobase and the 2011 ArcGIS plugin into 2012 or 2013? Seems such a shame just to lost all of that functionality.
View 2 Replies
View Related
Jun 9, 2011
If I load a dll file into the autocad (using NETLOUD), and after a while I want to make some changes in the dll, then re-build it. In order to do so, I must close the autocad, otherwise I'll get an error ("Unable to copy file,,, because it is being used by another process..."). There is anyway to release the dll so I can change it without closing the autocad everytime?
View 4 Replies
View Related
Feb 27, 2012
When I plot or run print of a drawing the view port frame is in the display and prints out with the drawing. How do I release this frame from display so it will not print?
View 6 Replies
View Related
Oct 30, 2013
I am trying to cut sections using Inventor I will begin by saying I am a fairly new user. On numerous occasions I am running into an issue where the section cuts are not shown correctly? I have attached an image showing an example of what I am talking about, you can clearly see that there are bolts and plates that should be displayed in the section cut which is shown above.
View 6 Replies
View Related
Oct 12, 2012
I am working on a sheet metal tee and i am having a problem with the Rip feature on this particular piece. I am not understanding why it will not rip all the way through this part.
Part was created with Inventor 2013
View 4 Replies
View Related
Sep 24, 2013
I have an IPN exploded assembly in an idw file. The individual parts were created in a multibody solid and sent out to and assembly using the "make components" command. My normal way of working is to leave the source part with appearance sent to "default". One the bodies are sent out to individual parts i manipulate material and appearance in the individual IPT files.
This is the problem..
The IPN file looks fine with the correct appearances when i open the IPN file. However, the iso view to the IPN in the IDW file does not shade correctly. It appears to shade all parts in the original gray "default" appearance.
The idw with the linked files are about 7MB after packngo and zip. Attach won't work. Please provide alternate means to transmit file. In the mean time the best i can do is screenshots
View 9 Replies
View Related