AutoCAD Inventor :: VB To Change Filename As Loop Progresses

Jun 8, 2012

I have VB code that loops through and utilizes Excel data to pick which file(s) to open, update, and close.  Then it opens the appropriate .idw file, updates it and saves it as a .pdf. 

The line of code I have now is simple:

_invApp.ActiveDocument.SaveAs("C:UsersxxDesktopA60.pdf", True)

and that writes the file to my desktop as a .pdf.

However, as the loop runs over and over, it will find another data set that is the same A60 type, so it will want to save OVER that .pdf it's already created.

How do I go about having a variable filename?  Something where it would add a _01 _02 _03 (or similar) to the end of the filename (i.e. A60_01.pdf, A60_02.pdf). 

View 1 Replies


ADVERTISEMENT

AutoCAD Inventor :: Change Filename Before First Save

Dec 17, 2013

I'd like to change the filename of a part before it's first save.The code would look somewhat like below. 

Private Sub m_appEvents_OnNewDocument( _ByVal DocumentObject As Inventor._Document, _ByVal BeforeOrAfter As Inventor.EventTimingEnum, _ByVal Context As Inventor.NameValueMap, _ByRef HandlingCode As Inventor.HandlingCodeEnum) _Handles m_appEvents.OnNewDocumentDim oDoc As Inventor.DocumentDim Name1 As String = "New Filename...."oDoc = DocumentObjectoDoc = oDocoDoc.PropertySets("Design Tracking Properties").Item("Part Number").Value = Name1oDoc.DisplayName = Name1oDoc.FullFileName = Name1.

The code partly works when opening a template but doesn;t work when create a an in place component or frame generated part? What do I need to modify to catch and change the filename before it's saved?

View 1 Replies View Related

AutoCAD Inventor :: CSV Filename Not Working?

May 10, 2013

I am trying to write code to collect standard info from a csv file to be added to iProperties.

Following is the code I have so far.

Dim Separators() As Char = {""c} Words = ThisDoc.Path.Split(Separators) FilName = "C:VaultDesigns" & Words(3) & "Spec_Sheet.csv"

Dim ReadCSV As New System.IO.StreamReader(FilName) Dim WordSets As New ArrayList()

Do While ReadCSV.Peek <> -1 WordSets.Add(ReadCSV.ReadLine.Split(",")) Loop

i = 0 SName = iProperties.Value("Project", "Stock Number")

For Each wrd In WordSets  If WordSets.item(i)(0) = SName Then  iProperties.Value("Project", "Description") = WordSets.item(i)(1)  iProperties.Value("Custom", "Finish") = WordSets.item(i)(2)  End If i += 1 Next
 
The only problem I have is that this line crashes. I am not competent enough to understand why.

Dim ReadCSV As New System.IO.StreamReader(FilName)

View 3 Replies View Related

AutoCAD Inventor :: Use Filename As Parameter?

Nov 8, 2006

Is there a way to use the filename to drive the parameters of the file?

Example: I have a cube that is called 4x4x4.ipt its dimensions d0,d1,d2 are 4,4,4 respectively. I want to rename it to 4x4x6.ipt and have the dimensions d0,d1,d2 resize to 4,4,6.

View 9 Replies View Related

Lightroom :: Change Filename For Single-image HTML Pages In Web Gallery?

Feb 9, 2012

I would like to change the default filename for the HTML pages produced by Lightroom 3 in the web gallery. Specifically, I would like to remove the string "_large" from the HTML filename, so it corresponds exactly to the image filename.
 
Specifically, the URL by default is like this: [URL] ....
 
and I would like it to be like this: [URL] ....
 
I assume there is some way to make this change using the template editors, but I can't figure it out.

View 2 Replies View Related

AutoCAD Inventor :: API To Get Inner And Outer Loop Of Sphere

Mar 6, 2013

I have a sphere body whose material is partly removed by a boolen subtraction with another sphere. When I query the EdgeLoop of sphere for Outer edge loop using function InvEdgeLoopPtr::GetIsOuterEdgeLoop(), I always get a value of VARIANT_TRUE. check for the inner and outer loop of a sphere? use the attached file for reference.

View 3 Replies View Related

AutoCAD Inventor :: Close Loop Function

Oct 23, 2012

Have sketched the geometry for an 18 tooth circular sawblade. However I have had difficulty applying the close loop function. As a result am not yet able to extrude the saw blade. What to do to implement close loop?

View 4 Replies View Related

AutoCAD Inventor :: Append Folder Location To Filename?

Apr 27, 2012

I am using this code snippet to open an idw.  With this code, the idw has to reside at the same file path as the current document. 

>>>>>>>>>>>>>>>>

Sub OpenIDW()
On Error GoTo Oops
Dim oDoc As Document
 Set oDoc = ThisApplication.ActiveDocument  
Dim sFullFileName As String    
sFullFileName = oDoc.FullFileName   
Dim sDrawingName As String   
sDrawingName = Left(sFullFileName, Len(sFullFileName) - 4) & ".idw"        
Dim oDrawDoc As DrawingDocument  
Set oDrawDoc = ThisApplication.Documents.Open(sDrawingName)  
Exit Sub  
Oops:     MsgBox "IDW File could not be found. FileName of IDW must be the same as this file.", vbInformation End Sub
>>>>>>>>>>>>>>>>>

"What if"... my idw is not at the same location, but under a subfolder instead..... like this

Part file c:designsDrawingsJobxxx

Idw file c:designsDrawingsJobxxxIDW

I am sure that this can be done by editing the line "sDrawingName = Left(sFullFileName, Len(sFullFileName) - 4) & ".idw"  " .  Everything I have tried did not work.

View 3 Replies View Related

AutoCAD Inventor :: ILogic Reading Beginning Of Filename

Jun 6, 2013

I'm attempting to create a rule using iLogic, which reads the first two letters of either the File Name or Part number (Which ever is easier)i.e. if a part number was AB12345, I would want the code to recognize the "AB"...At which point I'm trying to use an If-Then-Else statement to modifiy the material of the part, dependent on the first two characters of the File name.

As an example, where the underlined portion is what i don't know how to
If  iProperties.Value("Project", "Part Number") Begins with "AB" Then
    iProperties.Material = "Steel"
Else If iProperties.Value("Project", "Part Number") Begins with "AC" Then
    iProperties.Material = "Aluminum"
End If

View 1 Replies View Related

AutoCAD Inventor :: ILogic Access To Filename IProperty

Oct 13, 2011

I am trying to use the iProperties.Value("part1", "Summary", "iProperty") function to get the filename or complete filepath of a component within a subassembly. I know that these iProperties exist because I can insert them onto a drawing, and I see them in the general tab of the iProperty window.

However, when I try something like:

filename = iProperties.Value("part1", "General", "Filename")

I get an error message indicating that the General tab can't be found. How might I go about getting this filename iProperty, or is there an easier way?

View 4 Replies View Related

AutoCAD Inventor :: Define Filename On Subpart With Rule

Feb 6, 2013

I have an assembly which serves as a configurator. This Assy, needs to be copied many times. The assy contains 2 parts, which also must be copied. but when copied, the parts must have a new filename, and then the Rule cannot find them anymore. Therefore my plan is to define the filename with the configurator rule..

Example.:

Assy = Module.iam

Part1 = Module-1.ipt

Part2 = Module-2.ipt

I have this so far, but is doesn't work.. what do i put before the .ipt??

Filename = ThisDoc.FileName(False) 'without extension[Filname-1 inserted here].ipt.Diameter = "30"

View 9 Replies View Related

AutoCAD Inventor :: VBA Code That Allow To Get Filename From Border Of Drawing

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

AutoCAD Inventor :: Loop Through Specific File In Folder

Jul 19, 2013

I am trying to create a logic rule to replace the model reference in a idw file and then save as using the new file reference name. I am able to do this for individual files or components within an assembly file.

However what I would like is to check through all files of a certain type (for example ipt with filenames beginning "SSUA" ) in a specific folder. 

The following code from Curtis Waguespack works well for individual selected files but I would like to take it a stage further with the above parameters.

Dim oDoc as DocumentoDoc = ThisDoc.DocumentDim oRefFile As FileDescriptorDim oOrigRefName As Object For Each oRefFile In oDoc.file.ReferencedFileDescriptors'get the full file path to the original internal referencesoOrigRefName = oRefFile.FullFileName'present a File Selection dialogDim oFileDlg As inventor.FileDialog = NothingInventorVb.Application.CreateFileDialog(oFileDlg)oFileDlg.InitialDirectory
[Code]........

View 3 Replies View Related

AutoCAD Inventor :: ILogic FOR Loop To Unsuppress Features

Sep 10, 2013

I am currently designing a heat exchanger and want to adjust the number of water channel using iLogic. The number of channels to be active is based on the channel dimensions, and is calculated in my excel spreadsheet, but up to a maximum of 19. This is stored in the parameter "no_channel". Each channel is a seperate feature (extrusion) and named from "Channel 1" though "Channel 19".

My idea of doing this automation was to have iLogic suppress all the features, and then doing a closed loop to unsuppres the features I want active:
 
Feature.IsActive("Channel 1") = FalseFeature.IsActive("Channel 2") = False...Feature.IsActive("Channel 19") = FalseFor i = 1 To no_channelFeature.IsActive("Channel"(i)) = TrueNext
 
However, this gives me the following error:

Error in rule: Number of channels, in document: Radiator fin side.ipt

Feature.IsActive: No feature found with the name: "h".

View 2 Replies View Related

AutoCAD Inventor :: How To Heal Error For Loop Orientation

Jun 6, 2012

I'm desperate to know how should i heal the errors for loop orientation issues. I had imported the .stp file into inventor so i can do stress analysis. After imported the file and enter into repair environment, after i find the errors shown 9 errors in loop orientation issues. 

View 1 Replies View Related

AutoCAD Inventor :: How To Select Chain Loop On Chamfer

Aug 12, 2013

I wanted to chamfer a poligonal faced part, but had to select the edges one by one.

The Edge Chain buttons were grayed out, why?

View 1 Replies View Related

AutoCAD Inventor :: How To Stop ILogic Loop With Keyboard

Sep 27, 2011

Is it possible to stop an infinite loop when running an iLogic rule?

View 4 Replies View Related

AutoCAD Inventor :: Loop Select Sketch To Create Boundary

Sep 26, 2011

I am not sure exactly why this is a limited feature of Inventor 2011 but when you want to select a sketch to create a boundary patch you have to select each part of the sketch in sequence.  It's a pretty laborious task.  I am looking to a way to automate this using i logic. 

View 5 Replies View Related

AutoCAD Inventor :: Split Face Open Loop Error

Dec 16, 2013

I am attempting to split a face so I have a good area to apply a load in simulation and 3/4 of the areas split just fine but I CANNOT get the 4th area to split! This is all just projected geometry but left and right are symmetrical so I can't figure out why the L side works but not the R side.

View 2 Replies View Related

AutoCAD Inventor :: Redefine Center Point Of Loop Of Edges?

Mar 10, 2012

way to redefine a point that was placed in a model with a "Center of Loop of Edges" command?  Inventor doesn't seem to recognize type of placement unless it's been selected from the Point drop-down menu, but picking this in the midst of a redefine only creates a new point, it doesn't redefine the original point.

As it is, I've been forced to just delete the original point, create a new one and go from there.

Infrastructure DSP '14 / Product DSP '14 / Vault Professional 2014
Dell Precision T1650
Windows 7 Professional SP1 64-bit
Intel E3-1270 V2 3.5GHz / 32G RAM
Nvidia Quadro 2000, Driver 331.82
Space Navigator, Driver Version 6.17.7

View 2 Replies View Related

AutoCAD Inventor :: Roller Chain Generator Without A Closed Loop?

Dec 20, 2013

I'm designing a lift truck with a "chain over" lift - the lift cylinder has a sprocket mounted on the end of the rod, and the chain is grounded on one side.  The other end of the chain is mounted to a lifting carriage so that as the cylinder extends and pushes the sprocket up, the chain rolls over it and the carriage moves up (at twice the speed of the cylinder).  This is nothing new - it's pretty much how every single fork truck in the world operates.

My question is this:  can I use the roller chain generator to model this chain, or should I model the links and array them along a path?  My thinking is that if I can use the chain generator, I should be able to animate the chain using Dynamic Simulation.  But the chain generator seems to require a minimum of 2 sprockets in order to work - there's no way that I can see to have a "non-looped" chain or any way to just ground the end of the chain.

2014 Product Design Suite
W7Pro-64
Intel Xeon E5-1620 @ 3.60 GHz 16GB RAM
Dual 1GB NVIDIA Quadro K600 graphics

View 4 Replies View Related

AutoCAD Inventor :: Creating Wire Loop Between Two Connector Pins

Sep 27, 2011

I'd like to use the Cable and Wiring tools to model some fibre optics. I can see how this could work well, being able to set and check for the minimum bend radius. However, I'd also like to include a loop of greater than minimum bend radius between the two connection points, we tend to do this to reduce strain on the fibres. Any elegant solution for inserting the loop?

View 3 Replies View Related

AutoCAD Inventor :: ILogic Rule To Measure Loop Length

Oct 30, 2013

I have just started to use ilogic, what i want to do is measure the length of a loop in a sketch and then use this measurement as a parameter.

I have found this rule that will measure the loop length and display it in a message box

Dim se As SketchEntity = ThisDoc.Document.ComponentDefinition.Sketches(1).SketchLines(1) 
MsgBox(ThisApplication.MeasureTools.GetLoopLength(se)*10 & " mm") 

but i do not know how to capture the measurement as a parameter .

View 3 Replies View Related

AutoCAD Inventor :: Displaying Loop Measure Of A Spline / ARC / Slope

Mar 21, 2013

I want continuously to display the loop measuring of a Spline/Arc/Line/Slope (or even have it as a dimension / parameter on a sketch/part) because it change in relation to the block-position that constrains to the slope.

View 3 Replies View Related

AutoCAD Inventor :: Creating Macro To Run From Assembly That Will Loop Through Each BOM Item

Sep 28, 2012

I'd like to create a macro that I can run from within an assembly that will loop through each BOM item and add the quantity req'd to a custom property within the component.  I'm very familiar with VBA from Office, but I'm new to it with respect to Inventor so I'm pretty fuzzy with object titles and options. 

Here's an outline of what I'd like to do:

Execute Macro from within Assembly file

For Each BOM Item to # of BOM Items

If Vendor = "Make" then
Set Component Custom Property "Qty_Reqd" = Total Qty from BOM
Endif

Next BOM Item

View 9 Replies View Related

AutoCAD Inventor :: Get Rule To Re-run / Loop Through When Retry Button Is Pressed

Apr 16, 2013

I am trying to setup some rules to print various PDF files which we have managed to do without any problems.

The bit I am stuck on is when one of the PDF files being saved is open by another user.

We have been able to error trap it when it is open by showing a message box on error asking them to close the file befopre continuing.  The current message box being used is the Retry / Cancel box.

When the user clicks Retry we would like it to re-run the rule, or loops through the rule and check is the file is still open.  If the file is open return the same error, and if the file has been closed save the PDF file.  When Cancel is pressed it ends the rule (This Bit has been done).

My questions is how do I get the rule to re-run / loop through when the retry button is pressed.

Is it also possible to show the user who has the file open (or Previewing it in a Window Explorer)?

I have attached the Code currently Being used but I can post it here of preferred?

View 2 Replies View Related

AutoCAD Inventor :: Content Centre Prompted Filename And Part Number

Nov 8, 2011

Create a Content Center Part that prompts for a file name and sets the Part Number to whatever I save the part as? It would also be nice to... Have the browser Display name the same as the saved filename.

If I have a standard part with a blank filename, inventor will make the part number equal the filename at the first save. It is this functionality that I require when using Custom Content parts.

E.G. If I have a length of 'RHS 200x100x6.3 - 2000mm' selected from content centre and I want the filename to be saved as 'Part-001', then I would like the Part Number to be set as 'Part-001'.

If I then place the same member in another project/assembly I may want to call it 'ProjectPart-100', where the part number would then be 'ProjectPart-100' and so on.

This method ignores the filename entry in the Ipart table.

View 1 Replies View Related

AutoCAD Inventor :: Filename / Directory Name Or Volume Label Syntax Is Incorrect

Nov 30, 2011

"The filename, directory name or volume label syntax is incorrect. The database in K;lah/blahlah.widget.ipt* could not be saved".It's nothing to do with an improper name; even saving as the default 'Part 3' doesn't work.

At the moment I'm limping by using Save Copy As. Neither Save not Save As work at all.

View 3 Replies View Related

AutoCAD Inventor :: Batch Save Copy As PDF With A Custom Parameter Filename

May 14, 2012

An application that will let me choose a group of Drawing files (.idw) and perform "Save Copy As" to a PDF format on them. The Filename of each Drawing should be extracted from a custom Parameter I embeded in the IDW file.

I know I can use the Task Manager with a virtual PDF Printer to create these files, but then the PDF Filename will equal the IDW Filename, and I want it to be derived from the custom parameter I prepared inside the drawings.

View 2 Replies View Related

AutoCAD Inventor :: Save Copy As Doesn't Rewrite Filename 2013

Oct 9, 2013

When using save copy as to make an identical part with a different number, the file name in the top and the browser doesn't update to the new filenumber. only in the bottom file tabs is the name correct. if I go to file> save as I can also see the new filename. This is a hassle when doing this to multiple files in an assembly, as it makes it hard to keep track of which parts have been given a new name. It seems the filename input in the browser is only written once, and that is when the first file was saved for the first time. 

View 7 Replies View Related

AutoCAD Inventor :: Suppress BOM Info (filename / Stock Number) When Publishing To DWF

Dec 14, 2012

When I publish from Inventor to DWF (including sheets in the idw and an view of the iam assembly file) numerous part properties are included in the dwf that I would like to strip out so we don't share too much info with.

For example, filenames are included, stock numbers the complete bom from the model (as opposed to the parts lists that are shown in the idw's...  This info shows in the structured bill, and if you click on a part in the iam.

How do I filter all this out so I only show part numbers and descriptions in iproperties?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved