<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi, I possess very little knowledge of C++ but I
need to build a WIN32 PD external based on a third pardy API.</FONT></DIV>
<DIV><FONT face=Arial size=2>My main problem is how do I output a
String?</FONT></DIV>
<DIV><FONT face=Arial size=2><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT size=2>The external is for integration with a
sensor system called Ubisense. In the following code snippet, I need to find the
name of an Object (the name of a sensor) and output it throught a Pure Data
outlet. Would it be easier to use outlet_symbol()? If so
how?</FONT></FONT></DIV><FONT face=Arial size=2><FONT size=2><FONT size=2>
<DIV><BR>/////////////////////////////////////////////////////////////////////<BR>Map<Object,
Location> locations; </FONT><FONT color=#008000 size=2>//Create map
<BR></FONT><FONT size=2>Map<Object, Location>::const_iterator Map_Iter;
</FONT><FONT color=#008000 size=2>//Create map iterator<BR></FONT><FONT
size=2>PdLocationClient->get_all_locations(locations); </FONT><FONT
color=#008000 size=2>//Fill the Map with the objects and their
locations<BR></FONT><FONT size=2>String name; </FONT><FONT color=#008000
size=2>//Not sure this is a proper aproach<BR></FONT><FONT color=#0000ff
size=2>for</FONT><FONT size=2> (Map_Iter = locations.begin ( ); Map_Iter !=
locations.end(); ++Map_Iter) </FONT><FONT color=#008000 size=2>//Unfold
the Map<BR></FONT><FONT size=2>{<BR> outlet_float(x->z_out,
Map_Iter->second.pos_.z_ ); </FONT><FONT color=#008000 size=2>//output z
location<BR></FONT><FONT size=2> outlet_float(x->y_out,
Map_Iter->second.pos_.y_ ); </FONT><FONT color=#008000 size=2>//output y
location<BR></FONT><FONT size=2> outlet_float(x->x_out,
Map_Iter->second.pos_.x_ ); </FONT><FONT color=#008000 size=2>//output x
location<BR></FONT><FONT size=2>
PdNameClient->get_object_name(Map_Iter->first, name); </FONT><FONT
color=#008000 size=2>//Get the human readable Object name //bool get_object_name
(const Object &object, String &name)</FONT></DIV>
<DIV><FONT color=#008000 size=2> //PROBLEMS START
HERE<BR></FONT><FONT color=#0000ff size=2> array<char>
</FONT><FONT size=2>namearray = name->ToCharArray() ;</FONT><FONT
color=#008000 size=2> //???Convert the String to a char
array????<BR></FONT><FONT size=2>
outlet_anything(x->name_out, &s_symbol, name->Length ,
*namearray); </FONT><FONT color=#008000 size=2> //???Output the char
array??? void outlet_anything(t_outlet *x, t_symbol *s, int argc,
t_atom *argv);<BR></FONT><FONT size=2>}</DIV>
<DIV>
<P>}<BR>/////////////////////////////////////////////////////////////////////</P>
<P>Any help appreciated.</P>
<P>Tom</P></FONT></FONT></FONT></DIV></BODY></HTML>