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


ADVERTISEMENT

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 :: 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

AutoCAD Inventor :: Close ILogic Form With VBA Or ILogic Rule

Aug 19, 2013

how can I close an iLogic Form from either an iLogic Rule, or a VBA Rule (VBA is the Preferred method)?

View 5 Replies View Related

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 :: 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 :: 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 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 :: 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

AutoCAD Inventor :: Copy Filename To Part Number For All Parts And Sub-assemblies In Assembly

Sep 22, 2006

here's a macro I wrote to copy the filename to the Part Number iProperty for all parts and sub-assemblies contained in a top-level assembly. I wrote this after using a bunch of custom iParts and all the Part Numbers were the same for each part! (my fault of course, but a pain to fix one at a time).

Public Sub SetAllComponentPartNumbersToFileName()
Dim oAsmDoc As AssemblyDocument
Set oAsmDoc = GetActiveAssembly
If oAsmDoc Is Nothing Then Exit Sub
SetAssemblyComponentPartNumbersToFileName oAsmDoc
End Sub

[code]....

View 4 Replies View Related

AutoCAD Inventor :: Part Number In IProperties Is Automatically Updated To Match New Filename

Jun 13, 2013

When you do a Save As or Save Copy As in Inventor the part number in the iProperties is automatically updated to match the new filename. I would expect the Document.SaveAs method in the API to act in a similar way. However I found out that this is not the case.

SaveAs: Document.SaveAs(filename, False) does not update the part number. The new part will still have the same part number as the original part. This can give problems since in the BOM parts with the same part number are interpreted as the same physical part.

SaveCopyAs: Document.SaveAs(filename, True) does work as expected and the part number will update correctly.

Is this a bug in the API? or is there a reasonable explanation for this?

Inventor 2013 SP2

View 5 Replies View Related

AutoCAD Inventor :: Error In Reading RSe Stream

May 26, 2011

I am currently experiencing this error when basically putting an Inventor 2012 file (part or assembly) on a flash drive and then loading the file(s) onto a different computer with Inventor 2011 installed. Once in Inventor 2011 and trying to open the necessary file(s) I receive this error. Is there some difference between the 2011 and 2012 files that is causing this to happen? Or the face that I am using the student version of both?

View 5 Replies View Related

AutoCAD Inventor :: Error In Reading RSe Stream

Sep 24, 2008

My computer went down two weeks ago, bad enough that I had to get a new hard drive and start over. When I went to install Inventor, I kept getting Errors 1335, 1334, then error 1406 during installation. I seemed to have gotten beyond those, but when I went to open certain assemblies I started getting "Error in reading RSe Stream (4 not equal 2)" and "Error in reading meta types in RSe Segment AmDcSegment in..." and them it shows a certain file it doesn't like, sometimes repeating for multiple files. I clicked on the communication icon in the lower right of my Inventor screen and it said a maintenance update was available. I installed SP1 and tried again. Same problem. I clicked on the icon again, and it told me SP2 was available. I installed it and tried again. Same problem. I clicked on the icon again, and it told me SP3 was available. I installed it and tried again. Same problem. I clicked on the icon again, and it told me SP4 was available. I installed it and tried again. Now I can't open Inventor at all. Inventor crashes just on trying to open up. I've been running Inventor 11 since it came out with no issues whatesoever. Now I'm two weeks behind with no end in sight.

View 9 Replies View Related

AutoCAD Inventor :: Reading Content Center Path With API

Feb 22, 2013

is there a way to read the content center path with the API?

View 1 Replies View Related

AutoCAD Inventor :: Error In Reading RSe Stream (4 Not Equal 0)

Aug 10, 2012

I have just got this error message 'Error in reading RSe stream (4 not equal 0)' after checking out my assembly, and it appears the cause is a small hss part in Frame Generated frame.

The part appears in my tree in the frame assembly and it not showing up in my model, I can't delete it to brake the link.

View 3 Replies View Related

AutoCAD Inventor :: Error In Reading RSE Stream On Models / Assemblies

Sep 9, 2013

The error message has popped up on models, and assemblies, but no parts.

something on the internet said that this may be due to saving in a newer version on inventor, but i am using the latest version, and have been for the past few months. it is especially confusing as on of my drawings is only affected on one page, not the entire drawing. i have also had bad assemblies, but when the bad assembly is a sub assembly inside a bigger assembly its all fine!

View 3 Replies View Related

AutoCAD Inventor :: Reading Solidworks 2012 Files Directly Into System

Sep 3, 2012

We are using Inventor 2012 and would like to read Solidworks 2012 files directly into the system. This can be done with Solidworks 2011 files but our vendor upgraded his software between the time he sent us test files to try  the import and now. Can you tell me if the is a plug in or something that will allow us to read SW 2012 files or should we upgrade to Inventor 2013?

View 6 Replies View Related

AutoCad :: How To Measure Block Accurately From Beginning

Sep 24, 2013

When I use the measure tool on a block I have (3rd party file) of a carpet, it measures 187.5 x 444 (units are cm).

However, we know that's not the real measurement! On our printed sets it measures differently.

When I copy-and-paste the block and EXPLODE it a bunch of times, only THEN does it measure accurately (187.5 x 360).

How can I get it to measure accurately from the beginning?

View 6 Replies View Related

AutoCAD Civil 3D :: Design Profile Beginning And End Label

Jul 11, 2012

I'm trying to label the beginning and end points of a design profile (yellow line in the attached image) using the Horizontal Geometry Station Label tool. For some reason they will not show up.

View 1 Replies View Related

AutoCAD 2010 :: Customize Linetype With Arrowhead At Beginning And End

Jan 8, 2013

I am trying to custom a new linetpye as below, with an arrowhead at the beginning and at the end but point to opposite direction.  This is easy to build such linetype in Microstation, but I am new in autocad.

View 1 Replies View Related

AutoCAD Civil 3D :: Change Default Beginning Alignment Station?

Jun 4, 2007

where to change the default beginning station from 0+00 to 1+00 in my civil 3d profile template (dwt), so that the beginning station is always 1+00, unless the user changes it.

View 3 Replies View Related

AutoCAD Inventor :: ILogic Design Copy - Error Copying A File / Inventor Crashes

Nov 5, 2013

I'm trying to use iLogic Design Copy to copy an assembly and all its associated parts to another directory. The assembly contains content center parts. Inventor warns me that the destination file of one of the CC parts (and 18 others) will be overwritten. When I go ahead and copy anyway, the copying process stops at that specific CC part. The Design Copy Progress dialog box states there is an error copying that CC part. When I close the Design Copy Progress dialog box, Inventor crashes.

The error copying the CC part: I'm allowed to use content center parts in iLogic Design Copied stuff, right? I searched some related topics and I'm under the impression that Inventor keeps the CC parts in its own directory and shouldn't be trying to overwrite them.

View 3 Replies View Related

AutoCAD Inventor :: ILogic Min Or Max?

Nov 13, 2013

I am doing a tie rod the issue I have is when the length is between 2.001 and 2.250 we would drill thru all but only tap the ends .750 deep. If the part is 2.000 would would drill and tap thru in one step and not have to rotate the part in the lathe.

How do I get ilogic to understand if my number is between this 2.001 and 2.250 to lengthen the drill length parameter?Or add a mid plane cut? ( trying now code below reflects this try)

 Not sure what way I want yet but I just can't seem to find a snippet or code to do this. I tried to add a list in the parameters for it to read but seems to do nothing.

If LENGTH <= "2" ThenFeature.IsActive("Thru_All") = TrueFeature.IsActive("Hole_A") = FalseFeature.IsActive("Hole_B") = FalseiProperties.Value("Project", "Description") = "RETURN ROLLER SHAFT, " & iProperties.Value("Custom", "DIAM") & " Ø S/S, TAP THRU 3/8-16, " & iProperties.Value("Custom", "LENGTH") & " LONG"ElseFeature.IsActive("Thru_All") = FalseFeature.IsActive("Hole_A") = TrueFeature.IsActive("Hole_B") = TrueiProperties.Value("Project", "Description") = "RETURN ROLLER SHAFT, " & iProperties.Value("Custom", "DIAM") & " Ø S/S, TAP BOTH ENDS 3/8-16, " & iProperties.Value("Custom", "LENGTH") & " LONG"End IfIf LENGTH = (My_List) ThenFeature.IsActive("Mid_Cut") = TrueElse Feature.IsActive("Mid_Cut") = FalseEnd If

View 2 Replies View Related

AutoCAD Inventor :: BOM XML Import Via VB Or ILogic?

Mar 8, 2011

Possible to run the 'import .xml structure' routine for an assembly BOM using either iLogic or VB?? I'm trying to replicate the Import button at the bottom of the BOM screen....

View 5 Replies View Related

AutoCAD Inventor :: ILogic Component Add

Jan 16, 2013

What I am trying to do is insert a part into an assembly file using iLogic. I basically want to mimic Inventor’s “Place” command using ilogic, maybe something like this:

oPath = ThisDoc.Path & ""
oFile = "File.ipt"
Component.Place(oPath & oFile, False)

View 1 Replies View Related







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