Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: NSmitsCE

Just guessing at possible workarounds here, but maybe if each document really needs to be visibly opened for it to work, then maybe you could just avoid that process from changing your screen by setting the Application.ScreenUpdating property value to False just before that process begins (maybe before iterating the components), then set it back to True when it is done.  It is very important to make sure it gets set back to True though, so you may want to use something like Try...Catch statement, where if something goes wrong in the Try portion, the Catch portion could be used to set it back.  There are other similar settings like that too, but that one sounds like the most appropriate.

 

Also, I am just assuming that you do not have any of the components suppressed, and do not have more than one component referencing the same document?  Because if you did have some suppressed, you would want to filter those out because accessing the ComponentOccurrence.Definition property of a suppressed component will cause an error.  And if two or more components reference the same document, then it would try to process the same document multiple times, and may also be trying to overwrite an existing 3D PDF file.

 

And another little detail...at the end of the definition line of your 'Export3DPDF' Sub routine, you are setting the 'default' value of that optional String type variable with an empty string, using double quotes.

Optional ooTemplatePath As String = ""

I think that should be using vbNullString instead of """".

https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures... 

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)