阅读:2222回复:6
[求助]虚心请教AE中相对路径出现的问题
<P>Public Sub SetDocumentDataSourceToRelativePaths()<BR> On Error GoTo SetDocumentDataAsRelativePaths<BR> <BR> Dim pSxDoc As Isxdocument<BR> Set pSxDoc = Application.Document<BR> pSxDoc.RelativePaths = True</P>
<P> <BR> Exit Sub<BR> <BR>SetDocumentDataAsRelativePaths:<BR> Debug.Print "SetDocumentDataAsRelativePaths: " ; Err.Description<BR> Debug.Assert 0<BR> <BR>End Sub</P> <P>这个是官方网站提供的例子,我加进去的时候老是提示“用户定义类型未定义”</P> <P>这段代码应该放在哪里?如何调用它?谢谢</P> |
|
|
1楼#
发布于:2005-06-01 16:46
<P>在AE中是没有 Dim pSxDoc As Isxdocument这样的接口的</P>
<P>根据你需要转换了</P> |
|
|
2楼#
发布于:2005-06-01 23:03
是这样啊,谢谢提示,我再试试<img src="images/post/smile/dvbbs/em02.gif" />
|
|
|
3楼#
发布于:2005-06-01 23:10
谢谢你,我查了,AE中没有,这个是原来AO中内嵌的VBA代码,
<P>但是还是不知道怎么在AE中写出相对路径的代码。应该用什么接口呢?</P> |
|
|
4楼#
发布于:2005-06-02 09:53
<P>这个好象利用他现有接口比较困难哦,</P>
<P>我觉得可以自己做个保存工程文件的程序,那样我们就好知道一些数据源设置的信息保存在哪里了</P> |
|
|
5楼#
发布于:2005-06-02 10:00
谢谢老大的意见,我总觉得他这段代码应该是对的,只是我放错了位置或者其他的原因导致接口不可用的,郁闷
|
|
|
6楼#
发布于:2005-06-02 11:25
<P>问题解决了,谢谢各位的帮助。</P>
<P>ArcGIS Engine and ArcGIS Server for Solaris and UNIX support the use of relative or UNC paths to data. If your map document was created in ArcMap using relative paths, no further modifications are necessary for you to deliver or serve it in a cross-platform environment. However, in some cases you may desire to use a fully qualified UNIX path to the data source. The steps below walk you through this conversion process. </P> |
|
|