AutoCAD Inventor :: How To Get Model-document Name For Drawing-document
Feb 11, 2013I tried to print thisdrawing.modeldocument in a vba sub, but it doesn't work.
View 4 RepliesI tried to print thisdrawing.modeldocument in a vba sub, but it doesn't work.
View 4 RepliesI wish to open a part or assemblydocument by its item number in the drawingdocument.
I can make an inputlistbox with all Item numbers in the drawing.
I can also link the result of the inputlistbox to the partslistrow.Item("Item").Value.
I am stuck here. I can not find the link/reference from a partslistrow to a document.
Is there a propertyfield that keeps the link? Or another way?
Comparing partlist and BOM cells by value is not a method I can use
If i made a workplane include in a drawing document with api, then it will display in the view as a center line.
I want add some note to the Center line,but i didn't know how to select it with api, Is there have the API function to do this work?
Im looking to make a simple ilogic rule that can toggle an option in the document settings, the setting I would like to change is the Document settings> Modeling> Participate in assembly and drawing sections
I would like a form to switch the option on and off quickly, its a really usefull function however I know a few of my colleagues wont use if they cant find it easly.
After looking thru the api, i'm finding it hard to get a list of orphaned dimensions.
I can get a list of all the dimensions...easy.
I've basically deleted a part from the assembly and now want to remove that dimension in a section view on the drawing document.
But looking / comparing the properties of a non-orphaned vs an orphaned shows nothing.
Is there an orphaned list?
Is there a color override switch somewhere?
Or can I somehow get the object that the dimension is trying to reference and check to see if it is valid or has a valid file reference...or something?
I am trying to create a new base view in drawing-document.
I can get hold of the view but cant find a way to set reference data --- would like to set the "Line Style" to "As Parts" and "Hidden Line Calculation" to "All Bodies".
From a VB.Net program, I'm trying to create a dimension on a drawing document between two parts in an assembly. I can get the parts using component occurrence. The line marked below throws the following error: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)).
As you may see, I have allocated memory for both "Edge" and "Face" (Dim oEdge1 As Face) albeit one is commented out. Attached is the screen shots from the attribute helper add-in. In it, you will notice that the attributes are of type: "Face".
Public Sub CreateDrawingDimension(ByVal Part1 As String, ByVal Part2 As String, ByVal AttName1 As String, ByVal AttName2 As String)
' Get the Active Drawing document
Dim oDrawDoc As Inventor.DrawingDocument
oDrawDoc = invApp.ActiveDocument
[code]........
When i make a drawing in inventor, in the Title Block, it says the title of the saved document in the Drawing No. section. So what i am saying is how do i get the title of the saved document out of the drawing number section and either delete it or get it in the Title section.
View 2 Replies View RelatedWhen I link in an excel document to my model all parameters in that excel gets the unit (mm).
How can I change this? For instance I want some of the parameters to be an angle.
The code below crashes with an "attempt to write to protected memory" in debug mode (it crashes when it hits acDocMgr.add)but in the Release version it works fine. I am using Command Flags.Session
Dim acDocMgr As DocumentCollection = Application.DocumentManager Dim pStyle As Integer = Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("PSTYLEMODE") Dim acDoc As Document = Nothing If pStyle = 1 Then acDoc = acDocMgr.Add("acad.dwt") Else acDoc = acDocMgr.Add("acad -Named Plot Styles.dwt") End If
I've created a pdf file (with illustrator cs3). when I try to open it on photoshop CS3 I receive this message:
"error opening the portable document file (PDF) document. error code = 0X20030055"
I can open this pdf file outside photoshop.no problem openning other pdf files on photoshop.
I inadvertently saved a document as a jpg and wondered if there is any way I can convert it to a document file that is handled more easily with a file that is other than a photo file?
View 1 Replies View Relatedas of yesterday i have been receiving an alert when i try to move a jpeg into a new photoshop doc stating that my target document has a different depth than my source document and will (which it definiately does) result in lower than expected quality.
Photoshop specs: CS6; RGB; 16 bit; Res 300 pixels/inches; size: letter; (advanced setting - don't know what these are) color profile: sRGB IEC61966-2.1; Pixel aspect ratio: square pixels
I am trying to add an entity on a new drawing (document) with a new layer.
Following is the code snippet I have right now.
[CommandMethod("TEST")] public void Test() { Document newDoc = Application.DocumentManager.Add("acad"); Database db = newDoc.Database; DocumentLock docLock = newDoc.LockDocument(); try { using (Transaction tr = db.TransactionManager.StartTransaction()) { BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as [code]..........
PTPUtils.CreateLayer() method creates a new layer in the given DB. However, the code gives me an "eKeyNotFound" exception in the line p.Layer = newLayer.
If I remove the p.Layer line, the code works very well. But the entity only goes to the default layer "0".
I'm new to illustrator, how to I put a text string on a document.
View 4 Replies View Relatedsuddenly Photoshop CC seems to be broken. When using selection- or drawingtools, the documentwindow where I draw starts flashing black frames while drawing and sometimes the frame even stays black.
It's really odd, 'cause this Photoshop version used to work fine.Updating the version to the latest version (14.1.2 x64) didn't fix the problem. I use Windows8.
I don't believe any of the videodrivers were updated recently, but I will check that too.
In an object type Project I have a form with a button that calls another sub of the same form, the code looks something like this:
Private Sub CommandButton1_Click ()
'Set a Part Document as active document
Dim oDoc As Inventor.PartDocument
Set oDoc = ThisApplication.Documents.Open ("C: Users oZteC Documents Inventor Experiment part1.ipt", True)
oDoc.Activate
'Call "ModelParameters" within the same form
Call ModelParameters
End Sub
____________________
Public Sub ModelParameters ()
....
End sub
I want to move the sub "ModelParameters" to the object type PartDocument, the problem is when I move it the call doesn't work.
I want to run something like this:
ApplicationProject> Form> ClickButton ----> call to ----> DocumentProject> ThisDocument> Sub
I'd like to get the Vault file Id from an inventor document on the local workspace in order to be sure that it has been checked in (I want to be sure that all the files on the local disk have been checked in).
View 2 Replies View RelatedIs it possible to make a document invisible after it´s open? I would like to keep it in memory but not reachable to the user.
Making the document view(s) invisible is not what I´m looking for. I need to clear/close/delete all views WITHOUT closing the document..
( So it has the same state as if opened through API with the visible parameter set to false, e.g. Document.VIews.Count = 0
I'm using VB Express. I have got an assembly file. I want to open all sub parts according to "Parts only" BOM. Because I want to open every part only one time. Because there can be many occurences of same part.
I want to open each part only one time and save as bitmap views...
Normally I use below code but it can open same files many time according to assembly type unfortunatelly.
Dim oRefDocs As DocumentsEnumerator
oRefDocs = invDocs.AllReferencedDocuments
For Each invDocument In oRefDocs
invDocument3 = invDocument2.Open(invDocument.FullDocumentName, True)
next
I'd hoped that I could change the name of a part document like I did with sketches, simply assignment:
BSTR bstrName ;pPartDoc->get_FullDocumentName (&bstrName) ;wprintf (L"
Full document name was %s
",wchar_t(bstrName)) ;pPartDoc->FullDocumentName = L"Whatever" ;
But the compiler complains about no put method on that last line.How do I change the name of a Part Document programatically?
I want to change the default precision shown in my drawing from two decimal places to three. In my .idw file the "Units" tab does not seem to be there. I see Standard, Sketch, Drawing, Sheet. I could change each dimension one by one, but there's got to be an easier way.
View 2 Replies View RelatedI have created a frame using the frame generator that I need to document. It is created using about 5 sketches. The sketches are part of their own .ipt file. Now I would like to document the frame but cannot figure out how to do it. I have tried creating sections of the frame but I cannot snap to points of interest on the frame, such as where two pipes meet, when dimensioning. How do I document the sketches?
View 9 Replies View RelatedWhere did they put it in IV 2013?
View 9 Replies View RelatedMy 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?
in inventor VBA, is it possible to get all reference documents without opening an assembly file in inventor?
this is i am using right now,
Dim oAssyDoc As AssemblyDocument
Set oAssyDoc = oInvApp.Documents.Open(sAssyPath)
oAssyDoc.Update
Dim oAllRefParts As DocumentsEnumerator
If Check1 = True Then
Set oAllRefParts = oAssyDoc.ReferencedDocuments
Else
Set oAllRefParts = oAssyDoc.AllReferencedDocuments End If
Autodesk Inventor Professional 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010
Can I copy and past an assembley file to another folder in my system,as like as packandgo using inventor api ?
View 2 Replies View RelatedI already have been updating the DisplayName of documents but this name only shows in the Browser Bar and Title bar in Inventor.
When multiple documents are loaded, there are document tabs shown in het bottom area of the Inventor window, these show the File Name. I would like to show the DisplayName there but I don't knop how.
I'm using:
Win7 x64
Inventor 2011 pro
Visual studio Express 2008 - VB.NET
I have a user that is trying to link a MS Word document to a .iam file.
When he attempts to do this Inventor will embed the file instead of linking it.
Is it a config setting?
Here are the steps he is using for this process:
1) Open an assembly into the Inventor workspace.
2) Go to "Manage" tab.
3) Click "Insert Object" link in ribbon.
4) Select "Create from File."
5) Browse for word document.
6) Checkmark "Link" option.
7) Hit "OK."
The result of this sequence of operations produces an "embedded" file, not a linked file.
I can link this file on any other computer except this workstation.
I'm trying to write my first VBA program for Inventor with very little programming experience. I would like to create a userform which displays the materials list within a combobox.
The problem I have is that I would like the userform to remain open no matter which type of file is active. I would like the combobox to display the material list and current material when in a Part file and display N/A when in Assembly file.
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?