Markus,

> I have a question about creating Unique ID's.
> This is the initial position:
> As input features I have dxf-files with different feature types.
> Each feature runs through a counter and gets an unique ID.
> 
> What I want to do now: when the second dxf-file runs through the
> workspace the counter should start at the maximum count value+1 the
> first run outputs.
> The third dxf-file should start at the maximum count value+1 the
> second run outputs...
> 
> So that in the end each feature running through this workspace has an
> unique ID.

I think the best way to do this is either using a 
GlobalVariableSetter/GlobalVariableRetriever combo (latest FME builds 
seem to have dropped the 'global' from their names, can anybody from 
Safe confirm this?) or do some pre/post-processing using tcl or python. 
There's a sample of the former here: 
http://fmepedia.com/index.php/Pre_and_Post_Processing_Scripts:_Example_2

That way, you can set a variable to the max number encoutered in the 
first workspace (StatisticsCalculator) and use that to seed a Counter 
(after adding 1 to it). The really tricky bit is figuring out a way to 
let the workspace know when it is being run for the first time, but 
supposedly the same pre-processing trick can be used via a batch file.

-- 
Hans van der Maarel
Red Geographics
www.redgeographics.com / [EMAIL PROTECTED]




For insights into what's up at Safe Software and what's on the development 
horizon, visit Safe's blog at spatial-etl.blogspot.com.

Safe Software has also made slides available that outline enhancements planned 
for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 
of the FME Worldwide Users Conference. To view these slides, visit 
www.safe.com/2006uc.

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/fme/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to