Reach (large)

Welcome to the COE Discussion Forums! 

 

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.


 

Follow COE on

COE DISCUSSION FORUM
Any way to use the assemble() function with a list argument for surfaces
Last Post 25 Jan 2010 07:38 AM by MBERRY. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
CLIFFJOHNSON
500+ Poster
500+ Poster
Posts:553
Avatar


--
23 Jan 2010 02:25 PM  

Here is a formula for a Datum Surface:

CompleteSurfaceDatum = assemble(RESULTS_BODY ->Query("GSMSweepUnspec","x.Name==\"Seal Groove Remove Tool\"" ) )

I get an error claiming I am trying to valuate a Surface with a function returning a Curve. This seems to be because  there is assemble() for curves and assemble() for surfaces. And only assemble() for curves seems to work with a list..

If I make a List feature and try to use that it is no better.

Does anyone know a way to work around this?

 

 

 

knowledgeds
50+ Poster
50+ Poster
Posts:88


--
25 Jan 2010 03:22 AM  
Hello,

I don't think there is one...

This is a limitation with list management for functions that have variable arguments number : the function to use is chosen when parsing the expression, not when executing it. We can not know what will be the content of the list at that time.

MBERRY
500+ Poster
500+ Poster
Posts:584


--
25 Jan 2010 07:38 AM  
Hi Cliff,

You can use brute force method to join them one by one. I did this in an Action feature below (so it is easily reusable in other projects too).

-Mike

---------------------------------------------------------------------------

First create the action...

The arguments will be an input list and an output surface,

iList : List,oSurface : Surface

The action body will be,

Let S(Surface)
Let S2(Surface)
Let i(Integer)

/* Join first 2 surfaces */
S = iList->GetItem(1)
S2 = iList->GetItem(2)
S = assemble(S, S2)

/* If the list has > 3 surfaces then join them as well */
if iList->Size() > 2
{ i = 3
for i while i <= iList->Size()
{ S2 = iList ->GetItem(i)
S = assemble(S, S2)
i = i + 1
}
}
/* Return the joined surface */
oSurface = S


Then, you can call the action from a rule or other relation....a quick example,

Let S (Surface)
Let L(List)

L = `Geometrical Set.1`->Query("Surface","")
Relations\Action.1->Run(L, S)
`Geometrical Set.2\Surface.1` = S
Increase your CATIA V5 programming skills
v5vb.wordpress.com
You are not authorized to post a reply.

Active Forums 4.1