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: 

Question to Represantions in Inventor witk iLogic

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
j_weber1
420 Views, 5 Replies

Question to Represantions in Inventor witk iLogic

Hallo Everybody,

last time i found an article about sheet in drawings. There is a discproption about filling an multi-value parameter with sheet names of a drawing

 

If you want to show all the sheet names in the Form, then the easiest might be to use a Multi-Value User Parameter. 

1) Create a Multi-Value User Parameter (named e.g. Sheets) in the drawing document through Manage >> Parameters, and turn it into a Multi-Value parameter by right-clicking on it and selecting Make Multi-Value - you don't have to set the values, the below rule will do that

2) Create a rule that will keep the values of that parameter up-to-date: Sheets rule

	Dim MyArrayList As New ArrayList
For Each s In ThisDoc.Document.Sheets
  MyArrayList.Add(s.Name)	
Next
	MultiValue.List("Sheets") = MyArrayList

 

 

Now i want the same funktion for reprensations in a part or an assembly. So I change sheets with reprensatation, but it is not so easy like i think.

I'm searching the community but i did't found the answer.

 

Can someone help me to find the right way

 

thanks a lot




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





5 REPLIES 5
Message 2 of 6
philippe.leefsma
in reply to: j_weber1

You would need to take a look at some examples in order to find out what is the correct syntax.

 

Here are 2 links I could spot by quickly doing a search on the web...

 

http://www.mastergraphics.com/wordpress/2013/controlling-positional-representations-with-ilogic/

 

http://forums.autodesk.com/t5/inventor-customization/ilogic-controling-part-design-view-representati...

 

Hope that helps,

Philippe.

 

 

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 6
j_weber1
in reply to: philippe.leefsma

Thanks Philippe for the two links.

I Will look at the links and try to find out what I need.

 

Have a nice day and a good start in 2015

 

Jörg




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





Message 4 of 6
j_weber1
in reply to: philippe.leefsma

Hi Philippe once again,

I look at the links and i must say, that I found the links by my self.

But there is no solution of my idea.

My idea is to create a rep and fill an user parameter with the names of the rep over an ilogic rule.

Like in the exemple that i post first

 

 




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





Message 5 of 6
philippe.leefsma
in reply to: j_weber1

How about that?

 

Dim compDef As AssemblyComponentDefinition
compDef = ThisDoc.Document.ComponentDefinition

Dim ar As New ArrayList

Dim rep As DesignViewRepresentation
For Each rep In compDef.RepresentationsManager.DesignViewRepresentations
    ar.Add(rep.Name)
Next
	
MultiValue.List("param1") = ar

 

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 6 of 6
j_weber1
in reply to: philippe.leefsma

Hi philippe, I'm sorry that i read your message today. I was not in the office the last weeks.

but I will say thanks a lot for your answer and I will test it.

But I think thats the solution for my question.

 

Thanks a lot for your help. I hope that I can create one day the rules by my self.

 

Have a nice day

 

Jörg




Jörg Weber
CAD Systemtechniker für AutoCAD, Inventor, Vault





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

Post to forums  

Autodesk Design & Make Report