Has anyone dealt with the Autodesk NavisWorks Manage API before? I have some problems with using this API and I posted on 4 NAvisWorks forums, no one still answered. I also sent an email to the AutoDesk office in Africa but they did not reply. Well here are my problems:
I want to be able to read from a NavisWorks File (.nwd or .nwf) and get required data such as the dimensions of every model in the file, their positions, vertices etc.
to able to change the data (for ex, a rectangle with length 4 and with 5 to a rectange with length 6 and with 2)
to be able to write back the changes to the file and of-course display the changes instantly in the viewer.
I looked at almost every bit of the API documentation but cant seem to see the possibility to achieve what's required (maybe its not possible I am not sure). Any help will be greatly appreciated. Thanks in advance.
P.S. I am working with C#
in API folder where Navisworks is installed, you can find a lot of examples and API documentation.
And the answers:
I believe you can not change geometry, but in order to get it, the best approach is to debug a plugin and investigate what you can get from the object...
Also read this article to understand Navisworks file types.
If you would like to change property value (PropertyCategories), no problem, but again - no way to change geometry. You need to change original file (DWG, ...) and import it in Navisworks once again.
Both of the above.
using Autodesk.Navisworks.Api.Interop.ComApi;
When using this you can access the full geometry of the object and make your amendments here. There are examples of how this is used within the new SDK's. Sadly Navisworks is a read-only application and it would seem impossible to make the changes to the current file. Although you can amend the objects and re-import them.
Related
I am currently developing a Word-Completion application in C# and after getting the UI up and running, keyboard hooks set, and other things of that nature, I came to the realization that I need a WordList. The only issue is, I cant seem to find one with the appropriate information. I also don't want to spend an entire week formatting and gathering a WordList by hand.
The information I want is something like "TheWord, The definition, verb/etc."
So, it hit me. Why not download a basic word list with nothing but words(Already did this; there are about 109,523 words), write a program that iterates through every word, connects to the internet, retrieves the data(definition etc) from some arbitrary site, and creates XML data from said information. It could be 100% automated, and I would only have to wait for maybe an hour depending on my internet connection speed.
This however, brought me to a few questions.
How should I connect to a site to look up these words? << This my actual question.
How would I read this information from the website?
Would I piss off my ISP or the website for that matter?
Is this a really bad idea? Lol.
How do you guys think I should go about this?
EDIT
Someone noticed that Dictionary.com uses the word as a suffix in the url. This will make it easy to iterate through the word file. I also see that the webpage is stored in XHTML(Or maybe just HTML). Here is the source for the Word "Cat". http://pastebin.com/hjZj6AC1
For what you marked as your actual question - you just need to download the data from the website and find what you need.
A great tool for this is CsQuery which allows you to use jquery selectors.
You could do something like this:
var dom = CQ.CreateFromUrl("http://www.jquery.com");
string definition = dom.Select(".definitionDiv").Text();
I'm trying to create a wpf application such as a movies library because i would like to manage and sort out my movies with a pretty interface.
I'd like to create a library with all my movies getting information from the web, but i don't know how very well.
I thought to get the information from a web site, for example imdb, but i don't know if it's legally to capture html from page to get the nested information.
It's my first desktop application and I would also like to know if it is necessary to create a database within the project and then create a setup project with specified script for deploy it.
Sorry for the confusion but i would like to know too much things :)
Thanks a lot in advance.
The legality of web scraping is a grey area. See my question, "Legality of Web Scraping vs Normal Use" and the corresponding answers for some insight.
Even if the legality is not a problem, web scraping is a flimsy approach because the webpage structure may change without notice, making your application suddenly useless until you update it to the new format. You are much better off using some sort of web API (if the site providing the information offers it).
Whether you need a database or not depends entirely on what your application will be doing and how you design it - it's not something any of us can tell you.
Same goes for the setup project - in fact I wouldn't worry about that until you actually have a working application. Take it step by step and keep the scope within control.
Yes I did not think about api.
It's a great idea, maybe use "themoviedb".
But if i create an application based on it, that has to show all the movies that you have stored on your hdd and get , for example, the posters, the description and the ranking, i have to create a database according to you?
Thanks a lot.
I'm attempting to create a page that will take in given information from a form and create a new SmartForm in a given folder with a specific Template and SmartForm configuration.
The issue is that I have no clue how this could be accomplished. The closest information I could find was the code snippet give here: https://developer.ektron.com/Templates/CodeLibraryDetail.aspx?id=509&blogid=116 but from what I can see this doesn't associate the created content with a specific SmartForm configuration, just a title, folder, template, language, alias, summery, and metadata. Am I just not understanding what I'm seeing here?
Once I understand how to instantiate a new SmartForm it shouldn't be any trouble to populate the fields given a properly made input form. But without a way to specify which SmartForm configuration I want to use I see no way to fill in the proper fields.
Can anyone help me understand how this could be done?
note: I am using Ektron 8.0.2, not the current 9.*
UPDATE:
So I finally came up with a solution and it's a bit long winded for this page so I'm redirecting to a formerly useless blog of mine. If there is demand that I put it here I will do what I can to move the final solution I came up with to this page.
I should also note that in the end, PageBuilder was not used in any way.
Final Solution
-- John
I did something similar a LONG time ago - I think we were on v7.66 at the time. This is from like 2007, so it's been a while.
My app took Word documents as input, reformatted the content of a table (specifically laid out by our writers), and imported it into the Ektron system as SmartForm content.
At the time I want to say I had to analyze the SmartForm XML, and set up our content accordingly. There may have been better ways to do this, but we had a really aggressive deadline and I just needed to get the content into the CMS as fast as possible. I think you can assign the XML of a smartform-based content...
This wasn't an easy thing to do, and there was very little on the Ektron developer site to guide me. I want to say it was a matter of creating a content in the folder, which had the smart form attached to it. (It's been a while and my Ektron fu is a little rusty)
One thing that might help in this endeavor would be Content Types. It's a way of mapping the smartform xml fields to a strongly typed .net object. Ektron has a lot of really helpful info on this topic, and I'm pretty sure this will work in v8.0.2:
Ektron Content Types webinar
"Content Types and SmartForms part II" - Ektron DevCenter Forum Post
The ContentManager class was one of (if not the) first Framework API class introduced, so there's a good chance it would work for you.
UPDATE:
You might also give this SO post a read: Creating new smartform data using Ektron ContentTypes
I use RecaptchaControl, and the users complain that the image is not that clear (the black part in the the captcha is too hard to read). Is there any property to make the image less difficult (less noisy)?
<recaptcha:RecaptchaControl ID="recaptcha" runat="server" PublicKey="XXX" PrivateKey="YYY" OverrideSecureMode="true" />
To put it simply, no.
As others have said you can only customise the UI.
I'm the author of the article about the recaptcha API tutorial #web-development-blog.com and must say it's often very hard to read the text created images by recaptcha. While using the API I got sometimes better results while using a different language for the challenges.
In one of my projects I got a lot of complains and switched to a different script:
http://code.google.com/p/cool-php-captcha/
The challenges are less hard to solve and the script is very easy to use.
Possibly not what you are looking for but there are lots of custom captcha controls out there i.e.
CaptchaNET_2.aspx
With a bit of knowledge of the Graphics classes in C# it isn't a hard job to tweak the code to make the captcha simplier (or harder). We use one for a mobile phone web site and control is important otherwise it is unreadable in lower res phones
In some reCaptchas (I'm guessing this is somehow configurable), you only have to get one word right (I'm not sure how close the second word must be).
I've tested in the reCaptcha in my own website and it worked (two words wrong = fail, one word right + one wrong = success); tested in stackoverflow's reCaptcha and it didn't... I had to get both words right. That's why I think it's configurable.
I found this post along with the one below (where I read that only one word had to be right) exactly because I too am finding it too hard to get through reCaptcha's; too often having to refresh more than 5 times to get a readable pair. Other post:
Are reCAPTCHA CAPTCHAs getting harder or is just me
Google now allows you to change the difficulty setting.
I'm looking to create a indexable help file for a winforms app, but how do you get started?
The Microsoft MSDN is rubbish, it says "create a new project" but doesn't specify which type to create.
How do I go about creating a help file for my applications?
Are you looking for this
Integrating "Help" into WinForms Application?
Maybe this doesn't count as a real answer:
I would vote against those help files. 5-6 years back we had real context sensitive help files on a per-dialog-basis in our applications, and it was a lot of effort to maintain those.
Therefore, we changed this to shipping "simple" PDF files that appear on F1. We never got any complaints from users.
Recently we started migrating this to real HTML websites with lots of individual pages, a search function, "prev" and "next" navigation, and a printer-friendly format. This enables us to update the manual much quicker and makes it more "linkable" compared to PDF.
Personally, I really never get warm with those help files. E.g. I still do not understand why some files need to be trusted, before I can open and view them.