Question: Recently I received a question on how to avoid exposing commands in the custom plug-in when the license verification fails. Answer: One of the procedure to achieve this requirement is to do license verification in IExtensionApplication.Initialize() and throwing an exception if license verification fails. After throwing exception, none of the commands in plug-in will be available for the user.
In this blog post, we will see how we can create Array objects, the three array parameters deriving from
will be used to provide an interface for manipulating array parameters that are common to Rectangular, Path and Polar Arrays.
AcDbAssocArrayActionBody is an associative action that can be evaluated to manage or position array items based on Array parameters.
Creating Path Array:
This array requires a guiding curve and source entity as profile to pattern along the curve, basically all arrays are represented as a block reference entity, which references an array block table record (array BTR). An array BTR contains a list of entities to represent items in the array. By default, this class represents an array item as an instance of AcDbBlocReference referencing a source block table record (source BTR) positioned at the item transform.
Interestingly in the above code, percentage parameter of MaterialOpacityComponent can be set from values 0 to 1, where 0 indicates non opacity(complete transparency) and 1 indicates complete opacity(non transparency).
Interactively in AutoCAD, while editing new material, we can observe the word 'transparency' and its 'amount' being used.Here, values from 0 to 100 can be set as amount, where 0 indicates non transparency(completely opaque) and 100 indicates complete transparency(non opaque).
Because of this behaviour, for instance, if transparency amount is 75, opacity percentage has to be set as 0.25 in the code.
We have been receiving queries on OEM 2017 makewizard, to reach large audience I posting the necessary Visual studio 2015 set up requirements needed for successful build of OEM application.
Problem: ‘Next’ button is greyed out in OEM makewizard 2017?
Developing Environment for AutoCAD \OEM 2017 is Visual Studio 2015.
If OEM application doesn’t find VC++ or MFC tools, application disables ‘NEXT’ control.
In Visual Studio 2015, Visual C++ is not installed by default. When installing, be sure to choose Custom installation and then choose the C++ components you require. Or, if Visual Studio is already installed, choose File | New | Project | C++ and you will be prompted to install the necessary components.
You have to install MFC and VC++ tools, please follow this blog.
AutoCAD.NET API exposes “Application.Quit()” to exit the AutoCAD. However, “Application.Quit()” at present is unable to save all the user profile setting (like active ribbon tab ). One alternative approach for the issue is to use quit AutoCAD command through “SendStringToExecute”