AutoCAD Inventor :: VBA Replace Title Block Definitions In Drawing From Template File
May 7, 2013
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.
View 8 Replies
ADVERTISEMENT
Mar 20, 2012
I'm trying to insert our company logo (a DXF file) into the a title block definition however the insertion point seems to default to 0,0.How can I insert it with a user defined insertion point?
You will see from the attached screen snipe what I mean about being forced to insert it at the 0,0, coordinates. I'd like to insert it into clear space then scale it and move it into replace the existing logo.
View 4 Replies
View Related
Apr 5, 2011
I created a standard title block template drawing for my student classwork exercises, and when I constructed the title block I keyed in real dimensions to ensure the title block would completely print on a piece of 8.5 X 11 paper. Now whenever I attempt to draw a large scale drawing (say a 36" dia circle, it draws the circle well outside my title block. I know why this is happening, I just need some tips about how to allow a title block template to be constructed around my current drawing reguardless of the drawing scale.
View 5 Replies
View Related
Mar 1, 2013
find a template with a title block that i can insert my information. I already have my project completed on a 24x36 sheet and would just like to copy it over.
View 3 Replies
View Related
Apr 2, 2012
I was presented with a little renovation project and need to setup my own drawing. I've worked on CAD for a number of years while at a structural firm, an engineering firm and took classes in school but one thing I never had to do was setup was my own professional drawing from scratch. I know enough that it's crucial I start off on the foot. The engineering firm I worked at had everything ready so whenever I used CAD it was in an existing drawing or preparing a detail which the drafters imported. When I did some drafting work for an architect, he also had the drawing setup for me.
Since I'm now on my own I need to setup my own template drawing with a title block, layers, etc. Whats the best route for setting up my own sheets?
At my firm we always worked in a 1:1 scale & engineering units but since I'm doing floor plans for renovation work I plan on using the industry standard.
View 3 Replies
View Related
Oct 2, 2013
I am trying to replace the title block of the first sheet of the active drawing via C#. I currently am receiving the following error on the last line of The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)).
Why the code below is throwing this error? I have tried multiple variations of the code below to no avail and I'm sure this is something minor that I am overlooking. The title block definition under Drawing Resources is replaced with no errors, the title block on Sheet 1 is deleted just fine, but I can't seem to add a Title Block back in!
How Documents are defined:
Inventor._DrawingDocument oDoc = getDoc();Inventor.DrawingDocument sourceDoc =(Drawing Document) instance.Documents. OpenWith Options(sPath, options, false); Find, copy, replace: TitleBlockDefinition tBlock = sourceDoc.TitleBlockDefinitions[blockList.SelectedItem.ToString()]; TitleBlockDefinition newBlock = tBlock.CopyTo(oDoc, true); oDoc.Sheets[1].TitleBlock.Delete(); oDoc.Sheets[1].AddTitleBlock(newBlock);
View 1 Replies
View Related
Nov 21, 2012
I just recently received error from one of our customers regarding this kind of error (see attachment).
They are trying to reuse their own customized template to other PCs, they are copying these files to the template folder of Inventor. This method is successfully done in all of their pcs except for the two.
View 3 Replies
View Related
Jun 26, 2012
We want to use our AutoCAD company standard templates within Inventor. I’ve followed the procedures to accomplish this under the heading:
Create a .dwg template in Autodesk Inventor from an AutoCAD .dwg template
This works without any problems. Inventor is able to recognize the size of our template border (20.75” x 33”) and correctly selects a sheet format of 24” x 36”. The template border is centered on the 24” x 36” sheet just as we would like it (see attached).
The template is used to create a new Inventor .dwg, and base views are placed and annotated. No problems, everything looks good. The new drawing is saved and Vaulted. However, at some point Inventor "shifts" the location of the template on the 24” x 36” sheet format (see attached). This action is unpredictable. The drawing might be checked-out and checked-in several times before the “shift” happens. When it does we have to re-locate the views and other text annotation to suit the new title block & border location.
How can we lock the position of the template border & title block? (Should be noted that we need to keep our template positioned such that the bottom left corner is at 0,0,0 when it is opened in AutoCAD.)
Inventor RS 2011
AutoCAD Mechanical 2011
ASD 2013
Vault Collaboration 2011
Windows 7 Pro
View 4 Replies
View Related
Jul 24, 2008
How to convert existing 2d autocad title block into Revit title block template?
View 7 Replies
View Related
Jun 6, 2013
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.
View 9 Replies
View Related
Jan 22, 2013
Is there an add in or something for faster type in the title block in a drawing? Name, title etc?
Right now the author and date are automatically but when i save the file to for example to "D1234 hammer" it becomes the part number.
I have to edit the title.
I want to save the file to "D1234 hammer" and the partnumber to be "D1234" and title "hammer".
IS there a add-in that I type the title and name and its auto fill the title block? Or do I have to create a custom title block so the drawing can understand to only to take the numbers from <part name> and the letters becomes <title>?
View 3 Replies
View Related
Aug 17, 2012
We are going to be making a new title block and I have been looking at ways to get the new title block into the old drawings. It looks like the Inventor Drawing and Resource Wizard is the way to go.
The steps seem pretty straight forward and simple but I am not getting the correct results. For the source drawing I select my new title block and leave the boxes for borders, my new title block name, and sketched symbols checked. I then pick my drawing I want to get the new title block in. On the last step I can select Yes or No and get the same results. When I reopen Inventor and the drawing it still has the old title block in it.
View 4 Replies
View Related
Aug 9, 2012
I am attempting to attach a title block into a layout. This is my process:
1. Go to Building1 drawing, and go to layout. Without any viewports created, I attach a dwg file named titleblock1.
2. When I specifiy the location and scale, I cannot find the attached drawing.
why can't I attach files larger than 1.5 KB? I can't attach anything useful!
View 1 Replies
View Related
Jan 9, 2014
I am trying put drawing numbers on my drawings. The drawing number is "019-02-00038-x" where "x" is the page number in the set of drawings. How do I set this up? Every time I try to change "x" it changes it for the entire set of drawings.
I'm working with Inventor 2014.
View 1 Replies
View Related
Oct 26, 2011
Is it possible to set the drawing Scale to the Title Block? Seems like it is missing parameter...
View 8 Replies
View Related
Apr 13, 2012
I was curious, when creating multi sheet drawings, how can I place different information in the title block on each drawing?
Example, 2 pages, Description on page 1 = PAGE 1 DESC, by default this same description will show up on all subsequent pages. How do I get page 2 description to be different?
Inventor 2014 PDS
View 5 Replies
View Related
Dec 12, 2011
Can I pre-fill some of text in my drawing’s title block under the “Field Text” –“Edit Property Fields” ? Because some of the files I will use the same text again and again, if I can save the pre-fill text title block in the template, it will save me lots of time.
View 6 Replies
View Related
Aug 5, 2013
adding an unused template drawing title block resource.
'UPDATE TITLE BLOCK SHEET 1ThisDrawing.ResourceFileName="X:TemplatesStart Drawing.idw"
ThisDrawing.KeepExtraResources=False
DimoDrawingDocAsDocument=ThisApplication.ActiveDocument
'If iProperties.Value("Custom", "V1Scale") = NullString
oDrawingDoc.ActiveSheet.TitleBlock.Delete
[code]....
View 7 Replies
View Related
Nov 3, 2011
I want to add new properties so I can have new, custom rows when I go to Fields text in a drawing environment?
I can see how you add Prompted Entry ans so. Cant add anything to basic properties.
View 4 Replies
View Related
Nov 13, 2013
I am currently working with fx parameters and iLogic to drive a model and it's corresponding drawing to change based on a single user parameter.
I have managed to get the drawing to update both the scale of the views I need and the size of the sheet with the change in parameter using the following rule:
IfParameter("EB75551.ipt.Rise")<1801Then
ActiveSheet.ChangeSize("A1", MoveBorderItems :=True)
ElseIfParameter("EB75551.ipt.Rise")>1800Then
ActiveSheet.ChangeSize("A2", MoveBorderItems :=True)
EndIf
However when i attempt to use this with the title block using the function:
ActiveSheet.TitleBlock="My Title Block"
in place of the sheet change size it brings up the error message:
Error in rule: Drawing Title Block, in document: Drawing
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
I have read elsewhere that this is due to me having prompted entries for the scale and drawn by fields, however when i use the function designed for prompted entries: ActiveSheet.SetTitleBlock("Other Title Block", "promptedEntry1", "promptedEntry2")
It fills in the prompted entry fields from the code and if i change these entries in the "edit field" option they are overwritten when it is updated.
Is there a way have the prompted entries when you open the drawing fill in the "promptedEntry1" field in the rule so that I can use the rule? Or am I going about it the wrong way?
I should point out i'm new to iLogic and no-one in my workplace can use it so each person changing the "promptedEntry1" field to the scale they wish isn't a wise move.
View 2 Replies
View Related
Jan 31, 2012
I am very new to Autocad and I'm using LT2011 version. I am creating some basic drawings for small aluminum parts and need a border/title block to use. I assume there are already some saved as templates.
View 9 Replies
View Related
Jan 10, 2012
Is there an easy way to switch a title block after a drawing has been made and without affection the part and dimensions within the drawing?
View 2 Replies
View Related
Dec 5, 2013
I do a lot of work where I start with a full assembly drawing, then make more drawings for the individual parts. Is there a way to link the title block parameters in the part drawings to the title block in the full assembly drawing? The only way I found was to link the parts together and then grab the info for the drawings off of the parts, but if I'm implementing this in a template used by others I want them to still be able to just fill in the blank on the assembly drawing to make it work.
I was able to get iProperties to show parameter buttons, but I haven't seen any way to link to other files or anything like that.
View 9 Replies
View Related
Jun 21, 2013
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?
View 1 Replies
View Related
Apr 23, 2012
I already build sheet system ,and I found when I revise title block template,my sheet not update automatic,I must create new sheet,and double-click it to open it, then you can see update,who know why?
View 3 Replies
View Related
Dec 18, 2012
Is it possible to create a title block in AutoCAD 2013 and have the option to select from a drop down list a Name and Address to place in a certain area of the title block?
View 2 Replies
View Related
Apr 16, 2013
I have previously drawn my title block in Model space but i now know the correct way is to draw it in the layout.
Is there anyway of transporting the title block template into the layout and then saving that as a template for my future drawings?
Or do I need to go back to the beginning and draw the title block again from scratch in the layout and then save that drawing as a template for future use?
View 4 Replies
View Related
Mar 18, 2013
I have drawing template files created by a former employee that need to have the old company logo removed and replaced in the title block. If I double click on the title block, all information displays, except the graphic for the logo. If I explode it, I lose all the .dwt formatting. How can I replace the logo without losing the formatting of the rest of the drawing template?
View 6 Replies
View Related
Feb 26, 2013
In the title block of a my layout template I have tables inserted for revisions, drawing type, numbering etc. I have type already inserted in those blocks that I typically click on and then type in what I need it to say. My template works on all my other drawings except a particular one that I am currently working on.
When I click on the type, it automatically increases from 3/16" to 8" and enlarges the box to accommodate the new font size.
I've attached a screen. The top is before I click on the word "type" in the lower right corner and the bottom one is afterward.
View 1 Replies
View Related
Aug 21, 2013
I made a complex drawing.
Now i changed the part file just a little, the placement of a few holes, and saved it to a new name.
I need both versions.
In the Design Assistant i copied the drawing file to a new name.
Now i want, in the design assistant, to replace the file the drawing refferences, but can't, the replace option is greyed.
I understand there might be larger changes, is that the reason?
View 4 Replies
View Related
Aug 15, 2013
I want to use the File name property in my title block. But i don't want to see the .dwg extension.
Is it possible to not show the extension?
View 2 Replies
View Related