This is Spiderinnet1's Typepad Profile.
Join Typepad and start following Spiderinnet1's activity
Join Now!
Already a member? Sign In
Spiderinnet1
a spider crawling mainly in the .NET of AutoCAD
Interests: It is a spider crawling mainly in the .NET of AutoCAD. Sometimes, it may crawl a little deeper down into the Microsoft .NET world as well to find something good and fast there to digest.
Recent Activity
Revit|AutoCAD|Inventor|Navisworks .NET Addin Wizards 2017 have been released! They support Visual Studio 2017 now. They support the latest three versions (2019, 2018 and 2017) along with many old ones of related products, flavors and verticals of Revit|AutoCAD|Inventor|Navisworks. Many features have also been enhanced to adopt to the new versions and... Continue reading
Posted Aug 20, 2018 at AcadNetAddinWizard & More
chrs, you are welcome. It transforms the circle center coordinate from the World system to the Eye system. The Viewport.EyeToWorldTransform returns a matrix from the Eye CS (on the computer screen) to the WCS in which all AutoCAD entity geometries are expressed, thus the Center.TransformBy methods accepts its Inverse copy.
AutoCAD .NET Addin Wizards 2015 Has Been Updated! The latest build supports the latest three versions (2019, 2018 and 2017) of AutoCAD and most of its verticals besides all those already supported old versions such as 2016, 2015, 2014, 2013, 2012, 2011 and 2010. Many features have also been enhanced.... Continue reading
Posted Jul 17, 2018 at AcadNetAddinWizard & More
Ben, glad you did so. The post looks good and reads clear. (y)
It is interesting for sure. Not sure if they return the same hashcodes. Please give it a try and write a post. :-)
Ben, glad to know it works fine now.
Hi BKSpurgeon, it might be the DWG you tried the code with was too new. By default, new drawings only have the two text styles as mentioned. The DWG we tried on our end was a bit old and complex.
Jon, you are welcome. It is achievable with some challenging. Having fun.
The request does makes sense, but the current AutoCAD .NET Jig system does not provide direct way to do that. The current Jig system takes care of variables (Location and Rotation here) step by step, as demonstrated in many posts, instead of all at the same time. You may have already got some impression about it. At this moment, an idea is to care the Rotation normally in the Jig class, detect the cursor position and transform it into AutoCAD WCS somewhere else (e.g. in a timer), and change the Position there accordingly.
Jon, glad you like the posts and the blog. In terms of rotating block first and moving next, it is possible. The key point is that a temporary insertion point is needed for the block to rotate around. You may want to use the center point of the screen for that purpose so that the rotating block can be seen on the screen. Some other posts on the blog introduce WCS/UCS/DCS/ECS points and their transformations.
A few other posts on this blog introduce how to jig cylinders, cones and so on. Here is one: http://spiderinnet1.typepad.com/blog/2012/12/autocad-net-using-entityjig-to-create-solid-frustum-dynamically.html
Ben, the code and any other AutoCAD .NET have to run inside AutoCAD. The limitation is imposed by AutoCAD itself. That is it!
BKSpurgeon, the PushModelTransform() has a matrix parameter as can be seen. After the call, all graphics in the WorldDraw will be transformed by the matrix until the PopModelTransform() is called. In this case, the graphics were transformed from the UCS to WCS since points were collected and expressed in UCS.
BKSpurgeon, or another word may make it clearer. It's the least code that still creates a functional line jig. If we want to add more features, we need to implement more methods and/or add more code, e.g. adding more prompts, changing color, adding dynamic dimension, etc. Many other posts have demonstrated such.
BKSpurgeon, a good question. RXClass is a basic stuff and more ARX than .NET. It may provide some useful information such as DXFName and AppName. In fact, if you read the ARX documentation, you will notice a few RXClass related stuffs such as AcRxDictionary and some macros. You can simply iterate through the whole ARX class tree and their protocol extensions using them. However, the class has not been exposed to the .NET API and likely will not. But still we can use the RXClass to make our coding life a bit easier and improve the app performance if necessary. Here are a couple of posts demonstrating these. http://spiderinnet1.typepad.com/blog/2012/10/autocad-net-find-objects-from-database-concisely-reliably-and-quickly.html http://spiderinnet1.typepad.com/blog/2012/04/various-ways-to-check-object-types-in-autocad-net.html
BKSpurgeon, you are right. Confusions are here and there about fields and different properties. Discerning them might not be so easy or necessary but aware of when to use which are. For example, properties support (de)serializations but fields not; INotifyPropertyChanged implemented full properties support two-way WPF data bindings; Auto-Properties are easy to define but less flexible. In terms of those ENCAPSULATION, MVVM or similar big concepts, we can leave them to language lovers.
Dear Gclaurev, thanks for the further information. AutoCAD MEP has its own .NET API and the API documentation should be along with the product documentation.
Dear Gclaurev, I am afraid that you have stepped into a dilemma situation. As you may have already found out, LISP is easy to use but hard to control everything; the .NET API is a bit hard to learn but it is very powerful. By the way, the ObjectId is really an ARX or .NET thing and Auto/VisualLISP knows nothing about it.
Dario, you can simply remove the original block insert, create a new insert from the same block definition, and use it as the jigging target. Another post may give you some idea about it: http://spiderinnet1.typepad.com/blog/2012/02/autocad-net-entityjig-honor-ucs-when-inserting-block-insertblockreference.html
Recently a reader contacted us for ideas about some code (named as DirectionalLeaderJig) posted somewhere on web with the following title: Jigging an AutoCAD leader with directional text using .NET Through reading the article and trying the code, we found it would cause more Mis-Leading rather than give right directions.... Continue reading
Posted Jan 12, 2017 at AcadNetAddinWizard & More
Ben, almost. Both model and paper space layouts have the IsLayout as true, so !btRecord.IsLayout will return all real block definitions (block table records) in the current database. Layouts correspond to all those layout tabs under the drawing area. They are drawing containers but AutoCAD uses the same block concept for them, from the API perspective.
Ben, if you run the code in a viewport, you will notice the resulting yellow rectangle will always parallel to the viewport boundary no matter how the WCS is rotated or twisted inside the viewport. If you read the previous post and some after, the DCS concept will be clearer.
Ben, you are right. Any points you create will be expressed in WCS. If you'd like to draw them onto the current UCS, the inversion of the Editor.CurrentUserCoordinateSystem can be used to transform them.