[Manifold-l] Re: Problem with scripting examples
Lorne
lketch at hfx.eastlink.ca
Sat Jul 1 07:41:50 CDT 2006
This is V7 related Jerry. See AdamW's GeoReference thread
http://69.17.46.171/Site/Thread.aspx?id=21589
<http://69.17.46.171/Site/Thread.aspx?id=21589&ti=632840185176300000>
&ti=632840185176300000
Beginning with V7, 'Document' is a pre-defined object just as 'Application'
was in previous versions. Generally, you do not have to go through the
ActiveDocument object. For example, you can go directly to the ComponentSet
by using this:
Set Comps = Document.ComponentSet
You can get into a problem if you define a new 'Document ' variable since
that keyword is already recognized.
Lorne
-----Original Message-----
From: manifold-l-bounces at lists.directionsmag.com
[mailto:manifold-l-bounces at lists.directionsmag.com] On Behalf Of Jerry
Mulliken
Sent: July 1, 2006 7:51 AM
To: LF Lee; manifold-l at lists.directionsmag.com
Subject: Re: [Manifold-l] Re: Problem with scripting examples
Greetings,
I just assumed this had something to do with 7.0, since the script worked as
is in 6.5 for me. I'm certainly grateful for the explanation below,
as I've found the script handy.
Jerry
At 08:24 PM 6/30/2006, LF Lee wrote:
Dear Michael,
Thanks! I tried out the second option and the script worked!
I do believe the script examples given in the DVD and at Manifold's homepage
contain this problem, and somebody at Manifold should correct the scripts
before somebody else run into this problem later.
At 01:32 AM 30/06/2006, Michael Urtheil wrote:
Hi Lee,
regarding the problem you had with the script, it is a problem with the way
they Set document in line 1. Document is an object so it should not have
been set in this manner. Try either of the following changes to the script
and it will work:
Option 1 - Change the object name from "document" to "theDocument" (and
don't forget to replace all other occurences of "document" in the script)
Set theDocument = Application.ActiveDocument
Set components = theDocument.ComponentSet
Option 2 - delete or comment out the first Set statement and just set the
components object. With this option you don't have to change anything else
in the script
DELETE >>>> Set theDocument = Application.ActiveDocument
Set components = Application.ActiveDocument.ComponentSet
It will work either way.
Cheers,
Mike
Michael Urtheil
AquaResource Inc.
Date: Thu, 29 Jun 2006 19:17:12 +0800
From: LF Lee <loyfatt at tm.net.my>
Subject: [Manifold-l] Problem with scripting examples
To: manifold-l at lists.directionsmag.com
Message-ID: < <mailto:7.0.1.0.2.20060629191037.0225cc98 at tm.net.my>
7.0.1.0.2.20060629191037.0225cc98 at tm.net.my>
Content-Type: text/plain; charset=us-ascii; format=flowed
Hi,
I have need to create lines by azimuth and distance pairs. I looked at the
ScriptAzimuthLines scripting example but when I tried to run it, it gives an
error message "Object doesn't support this property or method 'document'
line 2".
Can anybody tell me what does the error message mean?
Regards,
LF Lee
Regards,
LF Lee
_______________________________________________
Manifold-l mailing list
Manifold-l at lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/manifold-l
Jerry Mulliken
JM Crop Consulting
1687 CR 24
Nickerson, NE 68044
Mobile- 402.720.0125
Office- 402.721.7467
www.jmcropimages.com <http://www.jmcropimages.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.directionsmag.com/pipermail/manifold-l/attachments/20060701/41258562/attachment-0001.htm
More information about the Manifold-l
mailing list