AutoCAD Inventor :: Changing Out VBA Code In Drawing Files
Feb 27, 2012
We have about 1000 drawings with VBA code that copies information from the title block into the drawing file custom properties. We have done this to get the information into a ACAD block to meet our clients requirements. It is an autosave routine so it runs whenever the file is saved in Inventor. We would like to make a change to the VBA code so we need to replace the autosave routine in the file with another.
Manual steps are:
Open the file
Enter VBA editor
Delete the autosave routine (without exporting)
Import the new autosave routine
Exit the VBA editor
Save and close the file
I'm sure we would write a routine to do this. However the effort from scratch may be more that just manually processing the files.
Currently running IV 2010.
View 2 Replies
ADVERTISEMENT
Jun 2, 2013
I have found some code which extracts the part number from the iproperties of a model and adds it to the custom iproperties of a drawing but this will only work on iam or ipt files.
Here's the code, I added the lines referring to the docment type as an attempt to fix the error but it didn't work...
If (ThisDrawing.ModelDocument Is Nothing) Then ReturnIf ThisDrawing.ModelDocument.DocumentType = kPresentationDocumentObject Then modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)End IfIf
[Code]....
View 2 Replies
View Related
Aug 10, 2012
I need some VBA code that will allow me to get the Filename from the border of a drawing. I've got code to get to the text of the filename, but I need to get the filename itself. Hope that males sense. Here's the
Public Sub GetModelFilename()
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
[Code]...
What the code returns is the text <FILENAME>. What I need is the filename itself.
View 8 Replies
View Related
Jun 10, 2013
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?
View 2 Replies
View Related
Jun 30, 2013
Is there a line of code I can add to my default.ivb file which will load another MYFILE.ivb file ?
View 1 Replies
View Related
Aug 27, 2011
How to change the color of layer that will be used within a drawing files for special purposes.
Ideally the code will make the color Red, but change to Black prior to printing.
The "logic" behind the code currently is to differentiate a layer called "Burn" to a highly visible color for the purpose of review by others then, prior to printing, change the color to Black. The firm I'm currently working for uses gray-scale B sided printers only. The firm currently uses Blue for dimension and extension lines so to produce drawings that portray both type of objects "lightly".
View 2 Replies
View Related
Feb 15, 2013
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
View 8 Replies
View Related
Jun 14, 2012
I have 4 different sized drawing templates made, one each for A,B,C and D size. There are times when I start a drawing on a C size border/sheet and it gets too cluttered as I add views or annotations. Is there any way to insert/change the sheet size to the D sized template without starting over?
View 6 Replies
View Related
Dec 16, 2008
I'm new to the style library and how to take an existing drawing that was created on one standard, and changing it to another standard I just created. The new standard has different dimension styles, text, and layers. I've added all the styles to my style library and I've set the new standard to the active standard in both the styles and standards editor and the document settings. If I create a new view, it comes in on the new standard, but the existing views are still on the old. How to I get the existing views on the new standard?
View 2 Replies
View Related
Aug 8, 2012
Is it possible to update an existing drawing to reference a new part or assembly file while maintaining associated views and possibly the annotation also?
I have tasks which require frequent subtle changes to assemblies. These assemblies will then be given a completely new file name, so it is no longer just a revision change but a new part altogether.
View 5 Replies
View Related
Nov 16, 2010
I have a piece of equipment that changes from 24" to 96" with 5 discrete sizes. I am using ilogic to make all the changes required to the part. Any way that I can change the scale of a drawing using iLogic so that it fits better on my drawing and be adjusted every time. I have multiple pages that most of the drawing views need to be changed every time.
View 9 Replies
View Related
Sep 21, 2011
I thought I kind of understood level of detail and master views but apparently not. I have an I-Beam that I have cut and bent in the part file. In the drawing I would like to show the beam both full length and in the bend configuration. From my reading I thought I would be able to create one view with the part in final shape and one view where I suppress all the bends and show the part with the cuts in it but all flattened out. I created view1 with the part bent, I then created view 2 and supressed all the bends. Unfortunately the bare does not toggle back and forth in the part, and when I place the part in a drawing. I am still not bale to have a difference in the part in the drawing with the two configurations either. What is the proper method of obtaining the two different views?
Also is there a way to request software enhancements?
We create many large assemblies where the shop uses a cut sheet to make the parts. Since many of the parts have secondary opperations like forming or cutting done to them i like to create a second sheet with the piece parts dimensioned on the sheet. In SolidWorks i would simply create the views, create an assembly BOM and link the balloons to that BOM, end of story. Not in Inventor! And creating a million LOD views to hide all but the one part in each view is not an answer for a professional CAD program.
Inventor Premium 2013 SP1.1
Vault 2013- plain vanilla version
HP G71 notebook
celeron cpu w 4gb RAM and 64 bit system
Win 7 home premium
View 2 Replies
View Related
Feb 13, 2013
How do you change the dimension text size in an .idw 2D drawing? The dimension text and arrowhead size is too small and I would like to make it sligthly larger.
View 3 Replies
View Related
Apr 9, 2012
I wondered if there is a way of changing view reference from one object to another.
Example.
I have two similar models but drawing done for one.
I could save it as with a different name and replace in all the views referenciing from old model to new one.
Possible?
View 3 Replies
View Related
Jul 8, 2011
I am attempting to change the thread format in inventor under the dimensions style editor, but it is grayed out and does not let me select anything from the drop down box. I want to display the thread information so it includes the unit. For example, this is what it shows now: 1/2 - 14 NPT. I want to change it to 1/2" - 14 NPT. What I need to do to be able to change the thread format in the dimension style editor?
By the way, I have a lot of drawings to do, so manually typing in 1/2" - 14 NPT will take sometime, so I am looking for a quick and easy fix.
View 7 Replies
View Related
Jan 18, 2012
I've been trying in vain to change the projection type in my styles editor to 3rd angle and keeping it like that for all future drawings.
It's easy enough to change projection type for an individual drawing by going through Manage > Styles editor > View Preferences, but I'd like all drawings in future to default to 3rd angle. I've tried saving the file as a new template (many times) in Templates > Metric but they always default back to 1st angle projection.
View 3 Replies
View Related
Jun 1, 2012
Is it possible to change a Parts Only parts list on a drawing into a Structured parts list? When a new parts list is created and you select the view it automatically chooses parts and greys out, preventing you from actually changing it manually. Is it possible to get around this without having to start a new drawing?
Inventor 2011
View 1 Replies
View Related
Apr 19, 2014
i need to change time of a clip that strat at 00:00:00:00 to 01:00:00:00 how can i do it?
View 2 Replies
View Related
Sep 1, 2011
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.
View 2 Replies
View Related
May 13, 2011
Is that possible to get the current Project number and Drawing by using some vba code?
View 2 Replies
View Related
Apr 4, 2013
Is there any possible way to enter a G Code into AutoCAD to end with the result of a 2D drawing of what my CNC has made? I have the code from the machine, and am not sure how to input it into the program to draw the face the CNC has cut out.
View 9 Replies
View Related
Oct 15, 2010
I need simple code to do just one thing, inserting a dynamic block that is stored in a separate file on my computer (like C:/base/b-22) in the drawing that I'm currently using. For example, I have a windows form with a list box with names of many dynamic blocks that are stored on my c drive, I would like to pick a block with a name and upon a click event of a button or other will go get this block from a separate file and insert it in the drawing I'm currently using, and would need to be able to pick the point of where I want the block to go. I'm using autocad 2010 with visual studio 2008- using the new autocad .net language.
View 9 Replies
View Related
Jun 26, 2012
I have a 2 part assembly on a drawing. When I use the following code, checkFilename is giving me the full file name of one of the parts instead of the full file name of the assembly. How can I fix this?
Dim checkBalloon As Balloon
Dim valueSet As BalloonValueSet
Set valueSet = CheckBalloon.BalloonValueSets.Item(1)
Dim checkFilename As String
checkFilename = valueSet.ReferencedFiles.Item(1).FullFileName
View 1 Replies
View Related
Nov 5, 2012
I have an assembly drawing made with 2 parts in it. I have the assembly drawing as Sheet 1 and each part also in the file as Sheet 2 and Sheet 3. What I have a problem with is that when I change or update the original files for Sheets 2 and 3 it doesn't update the sheets in the assembly drawing. Is there a way to keep these files connected. I need to have the standard sheets for filing and part designation, but when production call for the assembly to be needed, the assembly (Sheet1) with the Attached part drawings (Sheets 2 & 3) hit the production floor. Without them linked a mistake will be made. There are to many engineers in my department and we all make production changes to parts and if they are not linked bad things will happen. I am just trying this out, we have a lot of assemblies that will be great for the production if I can get all the part and assembly files to work together and print at the same time from on file.
I am using Inventor 2012 if that matters.
View 7 Replies
View Related
Nov 5, 2013
I have two problems with a IDW drawing.
Most of my views have been crosed over by a red line in the Model browser window (se attachment) What does this red line meen?
Also, all the views with the red line have been set to Raster View Only. I can untick it without problems, but when I click OK and reopen the dialog the checkmark is back on.
How come inventor turns this mark on by itself?
Using Inventor 2014 64-bit
View 9 Replies
View Related
Feb 27, 2012
The basic save, when making an inventor drawing....
Produces a file that is a Black Panel, to Every other program than inventor... (Tried 5 so far, some just fail to open)
REALLY basic thing that is failing... is it really a proprietary file they "called" .dwg?
Or is there some setting I have on?
View 3 Replies
View Related
May 3, 2012
I've got some IGES files, which I want to place into an assembly, and then create a drawing of the assembly.
If I open the IGES and place it in a drawing it works. If I create an assembly, place the same part, and then try and put the assembly into the drawing it doesn't work.
Attached is the IGES file. I'm using Inventor 2011.
View 9 Replies
View Related
Jan 2, 2013
I am having an issue with drawing files. I have set views on assembly files. But on the idw file it is showing wrong views... And this is making problems when i am trying to give dimensions. I have attached jpg files.
View 7 Replies
View Related
Aug 17, 2012
I’m looking to do a drawing of a content center file that has a table associated with it. I’m looking to do a table much like the general table option that pulls in parameters of a std. part. I understand that content center files have no intelligence to thread data but If there is no easy way of doing that I may need to pull in an excel sheet that has the data I need.
Ultimately I would like a table that has the part #, “Dim A”, “Dim B”, etc. that links to text dimensions on the content center part view in the drawing.
The reason I want it to be a content center file is that I have a couple hundred parts that only differ by one or two dimensions and don't want to have to go through that many drawings to update and make changes to.
I am using Inventor 2012 Pro
View 4 Replies
View Related
Nov 25, 2011
I don't understand why my parts aren't updating when I put a hole through them on the assembly drawing? I would expect the part (.ipt file) to get updated with a hole through it when I save the assembly drawing, however it doesn't. Do I have to change a default setting or does inventor no do this?
View 1 Replies
View Related
May 9, 2013
The attached files are two sprockets. The original part has 30 teeth. I need 34 teeth.
The MODIFIED part has one of my attempts at making 34 teeth. I have tried the following with the same error dialog box (see below):
1. Edit Sketch_6 (associated with Extrusion1) by deleting all but one of the teeth lines (2 arcs and 2 lines that make up a tooth) and making a circular pattern of 34.
2. Same circular pattern, except this time I "Close the Loop" (right-click on one of the teeth line segments > Close Loop > click on all the segments until the loop is closed).
3. Same circular pattern, except this time change the resulting patterned lines into construction lines, trace these lines with arcs and lines of my own (not construction lines), and close the loop on my own lines.
When each of the 3 attempts failed, I tried deleting Extrusion1 and making a new Extrusion feature from Sketch_6. I cannot select what I want in Sketch_6 in order to make the teeth.
I'm at the point where I'm just going to take the dimensions from the circular pattern sketch of 34 teeth, delete Extrusion1 and Sketch_6, and make my own sketch and extrusion.
For the future, I really would like to know - why is it so difficult to alter features like this? Yes, I understand that Sketch_6 is not fully constrained, and on top of this I am not privy to how it was generated in the first place (this is a part file from a vendor). But it does not strike me as something overly complicated for the Extrusion feature to recognize a change in its associated sketch. This is not the first time I have encountered something like this.
View 1 Replies
View Related