Navisworks General Discussion

Navisworks General Discussion

Reply
Active Contributor
StephenHenshall1260
Posts: 27
Registered: ‎06-28-2010
Message 1 of 13 (727 Views)
Accepted Solution

Publish using the Batch Utility (Simulate 2012)

727 Views, 12 Replies
02-07-2012 05:15 AM

Is it possible to publish an nwd file via the Batch Utility?

I currently generate a new model via the Batch Utility Scheduler but for security reasons, I need the file to be locked after 24hrs.

I can manually publish the file with these settings but I need to automate the file creation.

In the VB examples there is an example that does just that:

C:\Program Files\Autodesk\Navisworks Simulate 2011\api\COM\examples\AUTO_08\Auto_08.vbs

(I suppose it is also included in the 2012 version)

 

Just open with Notepad and read it.
This can be launced from a command line

and thus by a scheduled CMD-file.

 

I had to modify it to get rid of the password and expirying date...

 

Valued Mentor
Patrick_Aps_9121
Posts: 488
Registered: ‎02-19-2010
Message 2 of 13 (719 Views)

Re: Publish using the Batch Utility (Simulate 2012)

02-08-2012 12:17 AM in reply to: StephenHenshall1260

In the VB examples there is an example that does just that:

C:\Program Files\Autodesk\Navisworks Simulate 2011\api\COM\examples\AUTO_08\Auto_08.vbs

(I suppose it is also included in the 2012 version)

 

Just open with Notepad and read it.
This can be launced from a command line

and thus by a scheduled CMD-file.

 

I had to modify it to get rid of the password and expirying date...

 

Active Contributor
StephenHenshall1260
Posts: 27
Registered: ‎06-28-2010
Message 3 of 13 (712 Views)

Re: Publish using the Batch Utility (Simulate 2012)

02-08-2012 02:46 AM in reply to: Patrick_Aps_9121

Patrick,

 

Works a dream, many thanks.

Active Contributor
StephenHenshall1260
Posts: 27
Registered: ‎06-28-2010
Message 4 of 13 (710 Views)

Re: Publish using the Batch Utility (Simulate 2012)

02-08-2012 03:34 AM in reply to: Patrick_Aps_9121

Is there a way to set the date to increment automatically?

eg todays date + 1

Valued Mentor
Patrick_Aps_9121
Posts: 488
Registered: ‎02-19-2010
Message 5 of 13 (703 Views)

Re: Publish using the Batch Utility (Simulate 2012)

02-08-2012 10:19 PM in reply to: StephenHenshall1260

Within the VB code, surly, but I don't know how.

 

Product Support
lee.mullin
Posts: 479
Registered: ‎10-02-2007
Message 6 of 13 (694 Views)

Re: Publish using the Batch Utility (Simulate 2012)

02-10-2012 09:08 AM in reply to: StephenHenshall1260

Try the Navisworks API forum

 

http://forums.autodesk.com/t5/Autodesk-Navisworks-API/bd-p/600


Lee Mullin
Product Support Specialist
Global Services
Autodesk Ltd.


Active Contributor
StephenHenshall1260
Posts: 27
Registered: ‎06-28-2010
Message 7 of 13 (675 Views)

Re: Publish using the Batch Utility (Simulate 2012)

02-15-2012 03:56 AM in reply to: lee.mullin

Solution found,

 

If you replace the expiry argument with the following code, the published file has a onw week lifespan.

 

arg_expiry = dateadd("d", 7, Now() )

New Member
OLLE_86
Posts: 2
Registered: ‎05-16-2011
Message 8 of 13 (596 Views)

Re: Publish using the Batch Utility (Simulate 2012)

03-15-2012 09:01 AM in reply to: StephenHenshall1260

Do you know if there is a way of creating a batch that uses the publish option "embed database properties" instead of expiration date?

Active Contributor
StephenHenshall1260
Posts: 27
Registered: ‎06-28-2010
Message 9 of 13 (592 Views)

Re: Publish using the Batch Utility (Simulate 2012)

03-15-2012 09:21 AM in reply to: OLLE_86
Spoiler
Ollie. I looked at trying to change some of the settings at the bottom of the publish dialogue but had no success. I think it was the spces in the attribute names that caused the problem (together with my lack of vb knowledge). I tried with single and double quotes but couldn't get it to work.

 

Active Contributor
StephenHenshall1260
Posts: 27
Registered: ‎06-28-2010
Message 10 of 13 (589 Views)

Re: Publish using the Batch Utility (Simulate 2012)

03-15-2012 09:23 AM in reply to: OLLE_86
Ollie. I looked at trying to change some of the settings at the bottom of the publish dialogue but had no success. I think it was the spces in the attribute names that caused the problem (together with my lack of vb knowledge). I tried with single and double quotes but couldn't get it to work.
 
Sorry, not sure what happened to my last reply
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Have API Questions?
New Dedicated Forum for Navisworks API