Set Viewpoint Position Using command line

Set Viewpoint Position Using command line

yasikmondal21
Explorer Explorer
833 Views
6 Replies
Message 1 of 7

Set Viewpoint Position Using command line

yasikmondal21
Explorer
Explorer

Hello Team.

 How I can set the viewpoint position using command line while opening nwd file.  I am trying using the below script.

 

Position.Test : this is the plugin file where I have created  to set the view point position. but I want to send this using command line arguments.

 

 

yasikmondal21_0-1718001766192.png

 

0 Likes
834 Views
6 Replies
Replies (6)
Message 2 of 7

tetsuya_miwa
Advocate
Advocate

Assuming oPoint is Point3D from command arguments.

 

    Document oDoc = Autodesk.Navisworks.Api.Application.ActiveDocument;
    Viewpoint oCurrVCopy = oDoc.CurrentViewpoint.CreateCopy;
    oCurrVCopy.PointAt(oPoint);
    oDoc.CurrentViewpoint.CopyFrom(oCurrVCopy);

 

 
0 Likes
Message 3 of 7

yasikmondal21
Explorer
Explorer

Hello @tetsuya_miwa ,

 

I am trying to open navis work from batch file .

 

If I install navisworks first time by default there wont be any plugin available. So I can create the plugin from command line ? or is there any way to generate this? I am not using any asp .net application.

0 Likes
Message 4 of 7

tetsuya_miwa
Advocate
Advocate

Create your own plugin by c# or VB.net and place the dll file in the correct folder.

Navisworks will load it automatically.

0 Likes
Message 5 of 7

yasikmondal21
Explorer
Explorer

If i copy this dll plugin and paste it somwhere then how i will define the plugin path in command.. can you give me that command line arguments

0 Likes
Message 6 of 7

tetsuya_miwa
Advocate
Advocate

Not somewhere. The default place of plugin is stricktly fixed. Then  command line arguments can find corresponding plugin by class name only.

https://www.youtube.com/watch?v=mLsQFW5dV2w

0 Likes
Message 7 of 7

yasikmondal21
Explorer
Explorer

Thanks for information  @tetsuya_miwa  and it working for me. 🙂

 

Do we have any arguments where I can pass strage url of nwd file ? as this is a big file and we cant donwload everytime. So I wanted to use CDN or Azure Storage for avoid multiple downlaod.

"%userprofile%\NavisProject\100000000715815-1000.nwd" --> how to provide network file which are present in either LAN storage or Azure Storage.?

0 Likes