Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting the CoordinateSystemCode

10 REPLIES 10
Reply
Message 1 of 11
getman
393 Views, 10 Replies

Setting the CoordinateSystemCode

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
10 REPLIES 10
Message 2 of 11
getman
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
Message 3 of 11
Anonymous
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

Message 4 of 11
getman
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
Message 5 of 11
Anonymous
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

Message 5 of 11
getman
in reply to: getman

I am truly stuck on this, and would really appreciate any assistance at all.

Thanks,

Dan
Message 7 of 11
getman
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
Message 8 of 11
Anonymous
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

Message 8 of 11
Anonymous
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
>
>
Message 10 of 11
getman
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
Message 10 of 11
getman
in reply to: getman

Your suggestions are always helpful, and very appreciated.

This suggestion, however, is one that I have already undertaken without success. I reinstalled the version of the toolkit that came with the MG server, and still had the same problem. After uninstalling the version that came with the server, and reinstalling the version that came with the author, the problem vanished.

Strange....

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report