Lazcad is a blog mainly about Autodesk Software such as Plant 3D and P&ID. There will be always free tools and plugins developed from time to time. Check out the download page for more information.
-
LazPlantBrowser 0.3Beta
Added support for 2014 version.
Syncystyles does not work well with other command. If you wish to synch the drawings, run once with only Synchstyles. Once all the drawings are in sync, then you can run the other commands after that.
Download this update from the Download page.
Category: LazPLantBrowser
-
Lazcad Package Manager (Sneak Peek)
Here's a sneak peek package manager that allows you to distribute and manage Bundled AutoCAD application on multiple machines. It is meant for distributing Lazcad apps in the future which is subscription based (free or paid).
It can also be used to distribute your own plugin or files.

Category: AutoCAD
-
How to make Plant 3D Student version works
For those who doesn't know, there's a free Student version for all the majority of Autodesk products on this Autodesk Education Community site. One of the major problem with Plant 3D or P&ID, is that it won't allow you to create new drawings or even open Project Manager.
Today, I have a chance to try out Plant 3D Student version and
Here's my experience
- When i add a new drawing

- When open project setup

So what went wrong? Upon opening a new drawing, and this dialog box shows, i finally realized what was the problem.

Student Version
Here's some information about student version. If you open and save any drawing, it will be marked with Educational Version stamp which will be visible during plotting. So in order to prevent you from accidently making the mistake, it simply prompts you so that you're aware of this. On the other hand, Plant 3D or P&ID does not consider the dialog box when creating a new drawing or open the PSS. In both cases, it needs to open an untouched non-stamped version of the drawing which caused this dialog box to shows up.
So how to solve this?
Simply open the DWT file used for creating the new drawing and save it. Then open the PSS (projSymbolStyle.dwg) drawing (located in the root directory of the project) and save it as well. The next time, you won't have these problem anymore.
Category: AutoCAD P&ID, AutoCAD Plant 3D
- When i add a new drawing
-
Fixing AutoCAD Program Error
Whenever i ran into problem with any AutoCAD software, the first thing i would NOT do is reinstall or repair the installation. Most of the time, program itself do not write changes to the Program Files, so it would be impossible for the error to be caused by corrupted installation files. Since Windows 7, program that need to made changes to important directory (such as Program Files) will require administrative access. Running AutoCAD does not require that.
So what could went wrong? AutoCAD does write some files to the user registry and application data, so these files could be corrupted (during runtime error). For Plant 3D, these would be the script that i would run in the windows command line.
rd "%AppData%\Autodesk\AutoCAD Plant 3D 2013 - English/" /Q /S rd "%localAppData%\Autodesk\AutoCAD Plant 3D 2013 - English/" /Q /S Reg Delete HKCU\SOFTWARE\Autodesk\AutoCAD\R19.0\ACAD-B017:409 /f
What these script does is
- Remove the user app data directory
- Remove the local user app data directory
- Delete the user settings from registry
Remember, these would erase all the user settings and customization.
If this still does not fix it, prepare to reinstall .NET framework. Why? AutoCAD re-installation does not help you to reinstall anything that you have installed in the first place. If you uninstall AutoCAD, it would not remove .NET framework or all the C++ redistributable package. So if these are the cause of the problem, reinstallation would not fix it.
Category: AutoCAD, AutoCAD Plant 3D
-
Deploying AutoCAD 2013 and Offline Help
Tried to deploy AutoCAD 2013? If you have done so, you might found out that help files are no longer bundled together with the original installer. You can download the Offline Help Installer and create another deployment but here's a way to integrate help files into the AutoCAD deployment (works also for any vertical AutoCAD 2013 software).
Offline Help Installer here
Procedure
- Extract the content of the help installer into a temporary place.
- Copy the Help Installer folder and paste it inside the AdminImage folder of the AutoCAD deployment.
- Open Setup.ini and copy these lines to clipboard.
#==================== Help Installer [HELP] PLATFORM=NATIVE #PREREQUISITE=ACAD2013 PREREQUISITE=VCREDIST2010SP1X86;VCREDIST2010SP1X64 PRODUCT_NAME=AutoCAD® 2013 Offline Help BACKGROUND_IMAGE=SetupRes\AutoCAD.png PRODUCT_MESSAGE=AcSetupRes.dll;64 LOG=%tmp%\AutoCAD 2013 Help Installer.log EULA_PATH=eula EXE_PATH=HelpInstaller\HelpInstaller.msi EXE64_PATH=HelpInstaller\HelpInstaller64.msi EXE_PARAM= ACTION=INSTALL ALLOW_ADD_REMOVE=NO REMOVE_PATH= USE_EXTERNAL_UI=YES MAINTENANCE_UI_SEQUENCE=MaintenanceDlg;RepairDlg;MaintVerifyReadyDlg;FullProgressDlg;MaintCompleteDlg;MaintFailedDlg SUMMARY_FUNC=LoadSummary_Simple SUMMARY_SOURCE=SetupAcadUi.dll README_FILE= ADMIN_INSTALL=YES ROLLBACKABLE=YES DISKCOST=413000000 AVAILABLELANGUAGES=en-US DEFAULTMEDIALANGUAGE=en-US
- Inside AdminImage folder of the AutoCAD deployment, open the [DeploymentName].ini.
- Paste the content in step 3 into the INI (I paste it before InventorFusion line)
PASTE HERE #==================== InventorFusion [InventorFusion] ALLOW_ADD_REMOVE=NO
- Add HELP as one of the post-requisite for the main software
#==================== ACAD [ACAD] PLATFORM=NATIVE PREREQUISITE=IE;SSE2;DOTNET20;DOTNET4;DOTNET4LANG..... POSTREQUISITE=ACAD_PSPACK;ADSYNC;HELP
Now when you install using the deployment, you should notice that the Offline Help files will be installed last.
Category: AutoCAD, AutoCAD P&ID, AutoCAD Plant 3D
-
LazPlantBrowser 0.2.01Beta
Bug fix where annotation (reducer and spec break) shows as dot after running either Synchstyles or Refresh Annotation command.
Syncystyles command also has been updated to NOT refresh annotation. This is because of a buggy API. To update annotation correctly, make sure to queue Refresh Annotation command last.
Download this update from the Download page.
Category: AutoCAD P&ID, AutoCAD Plant 3D, LazPLantBrowser
-
Creating a Refresh Acquisition Addin for LazPlantBrowser
LazPLantBrowser loads extra commands by detecting addins in the addins folder. For the application to detect a plugin, the plugin must implement either ISilentBatchCommand or IBatchCommand interface.
- ISilentBatchCommand - Can run without opening the drawing. You will be provided with the Database object
- IBatchCommand - Run by opening the drawing. You will be provided with the Document object.
Implement Public Properties and Methods
For any of the interface, you will need to implement the following public properties/methods
- DisplayName - Addin Name
- Description - Description of the addin
- IsEnabled - Check if the addin can be enabled
- AllowMultiple - If the addin can be run more than one time
First, create a new class and implement ISilentBatchComand. Then, implement all the required properties/methods.
public class RefreshAcquisition : ISilentBatchCommand { private IProjectContext _projectContext; public string DisplayName { get { return "Refresh Acquisition"; } } public string Description { get { return "Refresh acquisition values"; } } public bool IsEnabled(IProjectContext projectContext) { _projectContext = projectContext; return (int)projectContext.ProjectType < 2; } public bool AllowMultiple { get { return false; } } }In the IsEnabled method, the main program will pass in an IProjectContext object. It can be used to detect which project type is executing the addin. In the addin, I checked whether the ProjectType is smaller than 2. Based on the list below, the addin can be run if the Project is P&ID or Piping.
- PnId - 0
- Piping - 1
- Ortho - 2
- Iso - 3
I also stored IProjectContext for use in next part.
Implement the Run Method
This method will be run for each drawing/database. You will be passed with ISilentDrawingContext which you can access the database of the current processed drawing.
public CommandResult Run(ISilentDrawingContext drawingContext) { var project = _projectContext.CurrentProject; var dlm = project.DataLinksManager; var rowIds = dlm.SelectAcPpRowIds(drawingContext.Database); if (rowIds.Count == 0) return CommandResult.NoChange; foreach (var rowId in rowIds) { foreach (var propertyName in dlm.GetAllProperties(rowId, true).Select(p => p.Key)) { if (project.GetAcquisitionStatus(rowId, propertyName) == null) continue; project.RefreshAcquisitionValue(rowId, propertyName); } } dlm.AcceptChanges(dlm.GetDrawingId(drawingContext.Database)); return CommandResult.Success; }Keeping or Discarding Changes
To end the method, return one of the following result
- CommandResult.Success - The addin run successfully, keep the changes and save the drawing
- CommandResult.Failed - The addin failed to run, discard the changes and do not save the drawing
- CommandResult.NoChange - The addin run successfully, no changes detected, do not save the drawing
Download the project here (Remember to fix all the referenced dll)
Category: AutoCAD P&ID, AutoCAD Plant 3D, LazPLantBrowser
-
Getting Started with AutoCAD Plant 3D API Development
Before coding for AutoCAD Plant 3D and P&ID, here are a few tools that you need to install.
- Visual Studio Express 2012 for Windows - Main development tool
- ObjectARX for AutoCAD 2013 - AutoCAD SDK for accessing database and drawing. Plant 3D SDK depends on this.
- Plant 3D 2013 SDK - To access API in AutoCAD Plant 3D & AutoCAD P&ID
Here are some simple steps to setup a new project.
- Create a new Class Library project.
- Set the target framework to .NET Framework 4.0 (Support AutoCAD 2012 and 2013)
- Add References to (Set copy local to false)
- AcCoreMgd.dll
- AcDbMgd.dll
- AcMgd.dll
- PnPCommonMgd.dll
- PnPDataLinks.dll
- PnPDataObjects.dll
- And other libraries as needed.
- To debug (F5) using Visual Studio Express, you have to manually edit the solution file since express version does not support this feature.
- Copy the csproj file and rename the extension to csproj.user
- Overwrite the content of csproj.user with the content below
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <StartAction>Program</StartAction> <!--<StartProgram>c:\Program Files\Autodesk\AutoCAD P&ID 2013 - English\acad.exe</StartProgram>--> <StartProgram>c:\Program Files\Autodesk\AutoCAD Plant 3D 2013 - English\acad.exe</StartProgram> <ProjectView>ProjectFiles</ProjectView> </PropertyGroup> </Project>Directory Structure
This is the directory structure that i normally use.
Project
- src
- PlantBrowser
- PlantBrowser.csproj
- PlantBrowser.csproj.user
- Commands.cs
- etc.
- PlantBrowser.Test
- PlantBrowser.Test.csproj
- etc.
- PlantBrowser.sln
- PlantBrowser
- lib
- ObjectArx2013
- AcCoreMgd.dll
- AcDbMgd.dll
- AcMgd.dll
- etc.
- PlantSDK2013
- PnIDMgd.dll
- PnPCommonMgd.dll
- PnPDataLinks.dll
- PnPDataObjects.dll
- etc.
This setup is good because it does not depends on the location where the SDK is installed and other users can open the project even without the SDK installed. This setup can be used for single and multiple developers (with Source Control software)
How do you setup projects now? Anyone using source control like TFS or Mercurial?
Category: AutoCAD P&ID, AutoCAD Plant 3D, Programming
-
Free Tools for Editing Plant 3D SQLite Database
Since both Plant 3D and P&ID uses SQLite as a default database, it is good to know some free tools that you can use to edit the database.
[For Geeks only] SQLite is originally developed by D. Richard Hipp back in 2000. It is a self sustaining database in a single file. It works without any process or any services. The only problems with SQLite is when writing to the database. Since it is still a file, no multiple users can write to the database at the same time. The database will be lock when a user start to write to the database and the lock will be release when the writing is done. So it is not encouraged to use SQLite as a database when there are multiple users working on one project.
Here are the free tools:
- SQLite Database Browser http://sqlitebrowser.sourceforge.net/ (Simple GUI)
- SQLite Expert Personal http://www.sqliteexpert.com/ (Personal version is free and it is by far the most user friendly one)
- SQLite Manager https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/ (Addons inside Mozilla! Works if you do not have administrator access to install SQLite Expert)
Feel free to post a comment if you have another one that is working for you.
Category: AutoCAD P&ID, AutoCAD Plant 3D
-
AutoCAD Plant 3D 2013 Extension 1
Finally Vault Plugin is available for AutoCAD Plant 3D 2013. It works with Autodesk Vault 2013 (WorkGroup, Collaboration, and Professional).
It is available from the Autodesk Subscription website.
Category: AutoCAD Plant 3D