Welcome to the COE Discussion Forum! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.

 

The COE 2008 Fall Industry Workshops

Experience two days of industry-focused education and hands-on training on the Dassault PLM solutions suite of products.  All education featured at the workshop is developed by and for users of CATIA®, ENOVIA®, DELMIA® and SIMULIA®.
 

Automotive
Oct. 15-16
Troy, Michigan

Aerospace & Defense
Oct. 27-28
Wichita, Kansas


Forum Highlight: CATIA V6

 

Get Answers to Your V6 Questions
Dassault Systèmes answers user questions about CATIA V6.  Discuss these answers and propose new questions with end users from around the world in the CATIA V6 Forum.

COE DISCUSSION FORUM
Subject: Populate list from Excell

You are not authorized to post a reply.   
Author Messages
COE-Member

12 Jun 2006 12:36 PM
Hi there,

Do any of you know how to populate a listParameter with values which come from a excell spreadsheet in R16 ?
I used to do that in R14 creating a temporary rule (oRelations.CreateProgram("TempRule".......)),
using the method List.AddItem(..) in the KWA rule feature. However that method is no longer allowed in
the rule editor in R16.

Thks,
Alexandre
COE-FORUM-USER

14 Jun 2006 05:08 AM
Hello,

your description is a little short...

I guess you want to create a volatile list containing volatile values that are taken from Excel (I deduced that because I see no way to do that with a persistent list because it would imply that you create a persistent parameter for each item in this list).

I think that you can still use AddItem in Rules. We just hided this method from rule dictionary for technical reasons (update loops are likely to happen if you use list.AddItem with persistent lists because the list is modified by rule but is an update input of it...)

Regards
COE-Member

21 Jun 2006 09:45 AM
Thks you for reply.
You are correct. It's volatile list with no reference to fixed parameter in the tree.
I 'll try to use the method in the rule editor.
COE-Member

21 Jun 2006 01:26 PM
Funny !

In fact the AddItem method works fine in the R16 rule editor, even though it's hided in the dictionary.
However when I try to insert a real value item in an existing empty list, just as shown below, an error
pop-up is displayed according to the picture attached. That worked in R14.

/*Rule created by acmoura 21/6/2006*/
List.1 .AddItem(0.7 ,1)

Regards
COE-FORUM-USER

22 Jun 2006 06:49 AM
You forgot the attachment (but I know the error raised)

In R14, that worked but that raised CATDua errors. A list feature has links to objects in it. When you inserted a volatile value (here 0.7), the code created a persistent parameter but it was not aggregated in the model (which is forbidden). Each time the rule was evaluated, it created a non aggregated parameter. So this worked but was completely buggy.

In R16, there is a coherent behaviour. You can add a volatile value only in a volatile list :

let l (List) /* volatile List not a feature */

l.AddItem(0.7, 1)

works OK.

But it maybe won't fit your needs.


COE-Member

26 Jun 2006 07:51 AM
OK,

I'll probaly use that volatille local list. The only drawback is that I'm not going to be
able to see the list feature which corresponds to my spreasheet values in the tree.

Thanks a lot
You are not authorized to post a reply.
Forums > COE Forums > KBE > Populate list from Excell



ActiveForums 3.6

    

401 North Michigan Avenue, Chicago, IL 60611-4267 | (312) 321-5153 | (800) COE-CALL (U.S.)