sully8391 Posted September 26, 2020 Share Posted September 26, 2020 (edited) 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 September 26, 2020 by sully8391 Quote Link to comment
JBenghiat Posted September 26, 2020 Share Posted September 26, 2020 I think you want range(NumRecords) Quote Link to comment
sully8391 Posted September 26, 2020 Author Share Posted September 26, 2020 Caught that mistake literally 5 minutes after I posted this, where's the delete button? lol Quote Link to comment
Recommended Posts
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.