dimven / NavisPythonShell

An IronPython console for Navisworks
MIT License
69 stars 14 forks source link

Script Example List of properties import nwp #5

Closed ambrogomez closed 4 years ago

ambrogomez commented 4 years ago

Hi there,

Thank you for the NPS. It is great.

I am trying for a while to get the properties of element through NPS, however it always give me an error: SystemError: Only valid for ModelItem in a document

I started looking to the example and I saw you were taking the properties in one of your examples.

I realised nwp is imported.

I tried to import, and totally copy and paste the example and it does not work either.

Could I please ask if I am missing something here?

Thank you very much.

ambrogomez commented 4 years ago

Solved.

It seems the Navis Python Wrapper was not included.

dimven commented 4 years ago

Yep, thanks for spotting that. I'll need to check with @eirannejad for the Navis Python Wrapper. For now you can modify the sample to get the selection like this: https://github.com/dimven/NavisPythonShell/blob/master/Script%20Examples/listProperties.py#L1

eirannejad commented 4 years ago

Navis Python Wrapper is open-source. Feel free to fork and modify. I don't actually use Navisworks at the moment so kinda stopped development on it.

https://github.com/eirannejad/NavisPythonWrapper