Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open .iam in project folder ilogic?

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
DeerSpotter
1448 Views, 21 Replies

Open .iam in project folder ilogic?

instead of this can i actually have it look at current project folder?

 

'these links will need to be updated for current physical location everytime folder is moved or renamed. 
Public Sub Main()

If Component.IsActive("DETAIL B 26310C:1") Then
ThisApplication.Documents.Open("G:\FEA\Baseline\shell outer _ 26310c rev - (Ilogic)\DETAIL B 26310C.iam", True)
End If

If Component.IsActive("DETAIL B 26310C REV1:1") Then
ThisApplication.Documents.Open("G:\FEA\Baseline\shell outer _ 26310c rev - (Ilogic)\DETAIL B 26310C REV1.iam", True)
End If

If Component.IsActive("DETAIL B 26310C REV2:1") Then
ThisApplication.Documents.Open("G:\FEA\Baseline\shell outer _ 26310c rev - (Ilogic)\DETAIL B 26310C REV2.iam", True)
End If

 
 End Sub

 Any help would help out alot.... thanks!

Image and video hosting by TinyPic
..........................................................................................................................
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
..........................................................................................................................


See My LinkedIn Profile
21 REPLIES 21
Message 21 of 22
DeerSpotter
in reply to: rjay75

even this fails arghhhh

shell2 = Component.Visible(ThisDoc.FileName(False)) 'without extension)
Component.InventorComponent(shell2).ExitEdit(kExitToPrevious)

 Still it cant find the document (im running the rule inside the component im editing)

Image and video hosting by TinyPic
..........................................................................................................................
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
..........................................................................................................................


See My LinkedIn Profile
Message 22 of 22
rjay75
in reply to: DeerSpotter

That won't work because you can't access a component occurrence while editing the component. It can only be accessed or referenced from the assembly.
Off hand don't know of a way to easily exit the editing document with out any references to the parent assembly.

 

Also the filename and the component names may look similar but they are two different names and don't match. So you can't use one to find another. If you want to use a consistent name, rename your components and use that name instead. Even if you change the underlying component document the component names stay the same.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report