Infrastructure Map Server Developer

Infrastructure Map Server Developer

Reply
Contributor
getman
Posts: 23
Registered: ‎04-14-2003
Message 1 of 11 (116 Views)

Setting the CoordinateSystemCode

116 Views, 10 Replies
11-11-2001 11:38 PM
Can anyone offer insight to why I might be getting this error?




The error: Failed attempting to find "COORDINATESYSTEMCODE" property/method on the object

Thanks for your help,

Dan
Contributor
getman
Posts: 23
Registered: ‎04-14-2003
Message 2 of 11 (116 Views)

Re: Setting the CoordinateSystemCode

11-16-2001 04:54 AM in reply to: getman
FYI: I reinstalled the SDF tool kit that came with release 5 of the server, which is what I had originally installed, and the problem persisted. I then installed the SDF toolkit that came with the MG Author 5.0.4.5 and the problem disappeared.

Thanks for all your help,

Dan
*Ajayi, Gabriel
Message 3 of 11 (116 Views)

Re: Setting the CoordinateSystemCode

09-11-2003 10:00 AM in reply to: getman
If the
size=3>SdfCoordinateSystemMetadata object is properly created, n
one of
your 2 lines of code below should give this error.

You usually get the error if you concatenate
calls as follows: 

size=2> <cfoutput>#
size=3>sdfTkt
.CoordinateSystemMetadata.CoordinateSystemCode#</cfoutput>,

apparently because
face="Times New Roman" size=3>sdfTkt
.CoordinateSystemMetadata is not
recognized as a COM object.

 

Gabriel


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Can
anyone offer insight to why I might be getting this error?

<cfset SdfCoordinateSystemMetadata.CoordinateSystemCode = "TX83-CF">

<cfset sdfTkt.CoordinateSystemMetadata =
SdfCoordinateSystemMetadata>

The error: Failed attempting to find "COORDINATESYSTEMCODE" property/method
on the object

Thanks for your help,

Dan

Contributor
getman
Posts: 23
Registered: ‎04-14-2003
Message 4 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
First, thanks for your support. I am a novice and your help is greatly appreciated.

Second, the object is created as follows:

If this is correct, can you think of a reason that I would be receiving this error?

Dan
*Ajayi, Gabriel
Message 5 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
 Dan,

 

Your creation code appears OK. What version of
Cold Fusion are you using? I am using 4.5.1. Test the code below. It works for
me. On what line does it fail, if it does?

 

<!--- Create a Toolkit
object--->
 <cfobject type="COM" name="Tlkt"
class="Autodesk.MgSdfToolkit.1" action="CREATE">

 

 

 

<!--- Create other COM
objects--->
 <cfobject type="COM"
name="SdfCoordinateSystemMetadata"  
class="Autodesk.MgSdfCoordinateSystemMetadata.1" action="CREATE">
<cfobject type="COM" name="Point"  
class="Autodesk.MgSdfDoublePoint.1" action="CREATE">
 <cfobject
type="COM" name="Point2"   class="Autodesk.MgSdfDoublePoint.1"
action="CREATE">  <cfobject type="COM" name="Segment"
class="Autodesk.MgSdfObjectGeometrySegment.1" action="CREATE"> 

 <cfobject type="COM" name="Geometry"
class="Autodesk.MgSdfObjectGeometry.1" action="CREATE"> 

 <cfobject type="COM" name="SDFObject"
class="Autodesk.MgSdfObject.1" action="CREATE"> 

 

 <!--- Some constants definition
--->
 <cfset sdfOpenUpdate = 2> 
 <cfset
sdfCreateAlways = 8>  
 <cfset sdfPolylineObject =
2>

 

<!--- Open the SDF --->
 <cfset
Tlkt.Open("c:\test.sdf",BitOR(#sdfOpenUpdate#,#sdfCreateAlways#), 0)> 

 
<cfset SdfCoordinateSystemMetadata.CoordinateSystemCode =
"TX83-CF">

 

<cfset Tlkt.CoordinateSystemMetadata =
#SdfCoordinateSystemMetadata#>

 

<!--- Define Point--->
 <cfset
Point.SetCoordinates(10,10)>
 
 <!--- Define
Segment  --->
 <cfset
Segment.Add(Point)>
 
<cfset Point2.SetCoordinates(20,10)>

 
 <!--- Define Segment  --->
 <cfset
Segment.Add(Point2)>
 <!--- Define line geometry
--->
 <cfset Geometry.Add(Segment)>
 
 <!---
Define some object attributes --->
 <cfset SDFObject.Key =
"K">
 <cfset SDFObject.Name = "N">

 

 <!--- Define SDF Object
--->
 <cfset SDFObject.SetGeometry(#sdfPolylineObject#,
Geometry)>
 
 <!--- Add SDF Object to file
--->
 <cfset Tlkt.BeginUpdate()>
 <cfset
Tlkt.AddObject(SDFObject)>
 <cfset
Tlkt.EndUpdate()>
 

 

  <!--- Close SDF file --->
 
<cfset Tlkt.Close()>
 

 

Gabriel

 

 



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">First,
thanks for your support. I am a novice and your help is greatly appreciated.

Second, the object is created as follows:<cfobject type="COM"
name="SdfCoordinateSystemMetadata"
class="Autodesk.MgSdfCoordinateSystemMetadata.1" action="CREATE">

If this is correct, can you think of a reason that I would be receiving
this error?

Dan

Contributor
getman
Posts: 23
Registered: ‎04-14-2003
Message 5 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
I am truly stuck on this, and would really appreciate any assistance at all.

Thanks,

Dan
Contributor
getman
Posts: 23
Registered: ‎04-14-2003
Message 7 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
Gabriel,

Thanks again for your continued support. I ran your code, and it resulted in the same error as before. So strange that it would run on your machine and not mine.

The code failed on line 20:


Any ideas?

Dan
*Friedrich, Scott
Message 8 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
I ran into problems with CF and SDF COM a while
back on previous releases of MG and CF.  I don't know what version of MG
& CF you are using but there was a 'hot fix' for CF released to address
problems with using the SDF COM Toolkit with CF.  Here is the archived
article.


 

Also, if possible, try using the COM Tookit in VB -
try and rule out CF all together.

 

Hope this helps,

 

Scott


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Gabriel,

Thanks again for your continued support. I ran your code, and it resulted
in the same error as before. So strange that it would run on your machine and
not mine.

The code failed on line 20:
<cfset
SdfCoordinateSystemMetadata.CoordinateSystemCode = "TX83-CF">

Any ideas?

Dan

*Rylander, Joakim
Message 8 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
Hi,

Why don't you uninstall SDFToolkit and then CF, then reinstall CF first and
SDFToolkit after?
The error should not be there if your installation is correct, the code is
correct.

Save some time and grey hair, reinstall...

Best regards,
Jocke

"getman" wrote in message
news:f0963b2.4@WebX.maYIadrTaRb...
> Gabriel,
> Thanks again for your continued support. I ran your code, and it resulted
in the same error as before. So strange that it would run on your machine
and not mine.
>
> The code failed on line 20:
>
>
> Any ideas?
>
> Dan
>
>
Contributor
getman
Posts: 23
Registered: ‎04-14-2003
Message 10 of 11 (116 Views)

Re:

09-11-2003 10:00 AM in reply to: getman
Scott,

I am using the latest version of both SWs, and as both machines are using the same versions I think the answer might lay elsewhere.

Thanks for your help,

Dan
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.