Jump to content

SOLVED: wrong variable


sully8391

Recommended Posts

I'm using the following code to import record formats into a file:

 

recordsList, numRecords = vs.BuildResourceListN(47, full_path) #full_path defined earlier

for record in range(recordsList):
	vs.CreateText(vs.GetNameFromResourceList(recordsList, record + 1))
	vs.ImportResourceToCurrentFile(recordsList, record + 1)

The first time this is run inside a new Vectorworks document there are 2 record formats missing. I have to run the script again for it to work properly. What's really weird is that the CreateText() call, which I've used to check what's actually in the list, doesn't print out all of the records that are imported; so it looks like there are records missing from the list are still imported, which makes no sense to me. I've also tried every version of BuildResourceList with the same results.

Edited by sully8391
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...