I included a VB code in our drawing template, but then I get the "Warning: You have a non-empty VBA project.." message. If I copy the code into iLogic, I just get an error message. Why it runs fine as a separate macro, but doesn´t work in Inventor, or how I can include the code into the template? URL....
I specify a template when I open a new auotocad file and drawi some shapes in autocad with c#.
the problem is the coordinates that I use to draw shapes does not match the template file and therefore the shapes are misplaced.(I am using centimeters for my code).
how can I change the coordinate of the template file to match my code coordinate?
I'm linking an excel file to an .ipt file with iLogic code determining if the Material type is a certian value it will find the correct material thickness. These file work great when working on them thru Vault but when I "Save As Template" and create this file where our other template files are located (not Vault) this fuction does not work. I have realized that I had to place the a copy of the excel file in the same file folder as the template ipt, but even this does not fix the issue.
I recieve this error:
Error in rule: Material, in document: Part6
'MWW Materials (Inventor).xlsx' could not be found. Check the spelling of the file name, and verify that the file location is correct.
If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted.
It seems completly countintutive that just saving the file as a template file would cause this not to work when all files that are required are located in the same file folder. Maybe I need a reference to the excel document within the iLogic code.
I am building a custom batch update for our drawings to take border definitions as well as custom iproperties from a current template and push them into a specified inventor dwg file. I built a form for the users to select the template they want to import into a list of files they place in the form. The program opens the template, get's all the information (iproperties, border defs, etc... using the active document to get the document) then iterates through the list of the users doing the following for each file (also getting the active document to get the items in each file): open, replace border definition, insert any non-existent custom iproperties, save and close the file. It works great when I keep the open visible set to true for the files. When I switch the visible property to false for each one of the files I want to open I get an error similar to this: Systems.InvalidCastException: Unable to cast object of type 'Inventor._DocumentClass' to type 'Inventor._DrawingDocument'. at ---- then my button click event here.
Does inventor technically not see a document as an active document if the file is not visible when opened?
I am having problems with my drawing template, I can make changes no problem, but when I use the template to start a new idw file the changes are not in place.
For example; view preferences, I want to work in third angle, I have this selected on the template but each time I start a new idw I have to change it from 1st angle.
e.g. 2; sheet size, I changed it from text to a drawing property, but it doesn't change when I edit the sheet size.
I made some changes to our normal template file for inventor and saved it to my hard drive in the public folder. When i open through windows explorer its fine and everything is correct. When i open a new idw and select this file through inventor it comes in with some of the tables having different size text and none of my leaders coming in.
I have been trying to export a 2013 Inventor idw file as a 2010 AutoCAD dwg file.
I use to be able to do this without any issues however I am getting the following error message which prevents me from exporting the file.
"Could not open the DWG template file. Please check the path and try again."
I am using 2013 Inventor Pro.
This export feature use to work fine when I used 2012 Inventor Pro. however when i try to do the same from 2012 I get the same error message.
I have checked the default templates file path in the Aplications Option menu and I have tried to set a default in the AutoCAD template file option under the export destination setting under the save Copy As function.
When I try to do a make components I get this error "Could not open default template file." All the Standard.xxx files are the designated folder and named appropriately. Plus I just used this command earlier today. I did do a "rebuild all" but I'm not 100% sure the problem came directly after that.
I recently update the template for my drawing files, change the title block, revision, note....and I can't find a clean way to import this template to the existing files. I tried the Drawing resource transfer wizard tool, but it doesn't seem to be doing anything that I want.
At my company we use part numbers as file names for everything. for example, part number 09090P00100000, will be saved as 09090P00100000.ipt and will have a drawing saved as 09090P00100000.idw.
Within the drawing template file, i want to set up an ilogic rule that will check that the part present in the drawing corresponds to the file name of the drawing. This rule will run after saving and will just display a warning if the file names do not correspond.
I just need some code that will get the file name of the part displayed in the drawing. Note that we use iparts so the code must get the member file name and not the factory file name.
Dim oDrawingDoc As DrawingDocument oDrawingDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet oSheet = oDrawingDoc.ActiveSheet
[Code] ........
Autodesk Inventor Professional 2011 Windows 7 Enterprise, 64-bit
I've been very dissapointed with the 'new file' dialog box in inventor 2013 as it takes far too long to open and navigate. I was wondering if there is a way to add a link to a few drawing template files either to the ribbon or the quick access tool bar so i can avoid using the 'new file' dialog box.
We just installed the new version of 2012 Product Design Suite. I've spend many hours creating great little ilogic dialog boxes to populate iproperty fields using custom iproperties and then automatically place this data on the .idw file when the view is placed on the new drawing. All works great when the part is created with my new 2012 part template and then placed on my new 2012 idw template. The trouble is with parts that were created with 2011 Inventor. Obviously, the old template does not have the ilogic data built into it. Is there a way to upgrade/migrate the part template file from 2011 to 2012 on an existing part?
I think I'm asking for a miracle here, but I have an assembly with 40-50 parts that I created in 2011 and now need to build the idw files for them and would really like to be able have the customized iproperties added to the existing part files.
I am trying to create an iLogic (or VB) rule to update an active drawing title blocks from our Template File.I don't want to use any of the external software (Transfer Wizard etc), we just need a simple rule that will update the title blocks when we need to.
I have some code to replace the current title block with a title block from a template file. I just don't like how it adds a new title block definition named "copy of titleblock". I'd like to delete or replace the current title block definition so only the newly added one is listed.
Sub test() Dim odrawdoc As DrawingDocument Set odrawdoc = ThisApplication.ActiveDocument If (odrawdoc.DocumentType <> kDrawingDocumentObject) Then Exit Sub Dim oTemplate As DrawingDocument Dim oSourceTitleBlockDef As TitleBlockDefinition Dim oNewTitleBlockDef As TitleBlockDefinition Dim oSheet As Sheet Set oTemplate = ThisApplication.Documents.Open(ThisApplication.FileOptions.TemplatesPath & "template.idw", False) Set oSourceTitleBlockDef = oTemplate.ActiveSheet.TitleBlock.Definition Set oNewTitleBlockDef = oSourceTitleBlockDef.CopyTo(odrawdoc) ' Iterate through the sheets. For Each oSheet In odrawdoc.Sheets oSheet.Activate oSheet.TitleBlock.Delete Call oSheet.AddTitleBlock(oNewTitleBlockDef) Next oTemplate.CloseEnd Sub
I'm just being picky at this point, but I don't want a buildup of title block definitions. We reuse drawings all the time which is why a simple method of updating a title block would be nice. I can just imagine in some years time after a title block update or two there are 20 "copy of copy of copy of .................. titleblock" listed in a drawing file.
Setting up a tabulated ipart drawing template. Which is better...one drawing file with a table or individual drawings for each tabulation? Also does one method work better than the other when introducing vault?
How can you use a template file from your personal files to use it in an already existing .dwg file.
I knwo how to do it if I start the drawing from scratch and I select that template, but I want to put this existing drawing into my personal template file from my documents.
I want to open a dwg file from code in my program. I have a string variable containing the full path and file name. I want to open the dwg file in an instance of Autocad that is already running, I don't want to open Autocad. The program is written in VB 6.0.
I implemented the code from the autodesk developers guide for plotting. [URL] .... I made a few minor changes such as making it a sub instead of a command, and commented out a few of the plot settings
the routine seems to work except that I don't get a PDF
I added the actrans.commit() to see fi that might work = nope.
also note that ACF.acdoc & ACF.db in my code replace acdoc & acCurDb in the original code
'<CommandMethod("PlotCurrentLayout")> _ Public Sub PlotMe(suBpath As String, subFileName As String) '' Get the current document and database, and start a transaction 'Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument 'Dim acCurDb As Database = acDoc.Database Using acTrans As Transaction = ACF.Db.TransactionManager.StartTransaction() [Code] .......
A part of an application I'm writing involves detaching a specific xref of known filename and path from an open drawing. I'm having a surprising amount of trouble figuring out how to do this or finding any examples "out there" (A'desk forum, the googles, A'desk developer's guide). I have the code for attaching an xref, but detaching is presenting unexpected problems.
LISP code to link to a scr.file.I would like to run ACADDOC.lsp with abobe code everytime I open a drawing.But I want to link the KISP file to script file of mine like C:
correct font style from 1071 group code in style table of dxf file ? I am able to read the Font name and font file name from group 1000 and 3 respectively, but not able to get the font style: whether it is Regular, Bold, Italic etc.
I know i have to decode the long values in 1071 group codes like: 50331682, 50372882 etc. But dont know how to arrive the Regular, Bold, Italic etc Font Style. How to decode this value ?
The requirement of above information to me is that i am making a Graphics viewer for a specific purpose which reads and displays Graphical Entities from DXF (ascii) file.