Jump to content


VBScript cycling over the open drawing with Documents.Item


1 reply to this topic

#1 Flaminio

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 31 March 2023 - 09:14 PM

Hi, i'm not able to make active a different drawing (VBScript runs in Nanocad 5)


n=ThisDrawing.Application.Documents.Count 'this formula works, collect the number of open documents in this moment

U.Prompt "open documents number: " & n

Dim doc

Set doc = Application.Documents.Item (1) 'This make error

Do you know how i can get a specific open document, to make it active or so? Thanks

#2 Dsw

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationItaly

Posted 28 May 2024 - 02:26 PM

Is an old post but I would like to make my contribution answering to your question.

dim doc
Set doc = Application.Documents(1)
doc.Activate()
' or a short way
' Application.Documents(1).Activate()

----
My open-source and freeware projects
https://sourceforge....ftware/profile/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users