Code:
Sub Example_SummaryInfo() ' Add standard properties ActiveDocument.SummaryInfo.author = "Darthurs" ActiveDocument.SummaryInfo.comments = "DWGPROPS example" ActiveDocument.SummaryInfo.HyperlinkBase = "http://www.intellicad.org" ActiveDocument.SummaryInfo.Keywords = "Building Complex" ActiveDocument.SummaryInfo.LastSavedBy = "Ben" ActiveDocument.SummaryInfo.RevisionNumber = "Build 11.1.435" ActiveDocument.SummaryInfo.subject = "SummaryInfo" ActiveDocument.SummaryInfo.title = "CMS IntelliCAD" Dim author As String Dim comments As String Dim hyperLink As String Dim keyWord As String Dim lastSave As String Dim revision As String Dim subject As String Dim title As String ' get and display standard properties author = ActiveDocument.SummaryInfo.author comments = ActiveDocument.SummaryInfo.comments hyperLink = ActiveDocument.SummaryInfo.HyperlinkBase keyWord = ActiveDocument.SummaryInfo.Keywords lastSave = ActiveDocument.SummaryInfo.LastSavedBy revision = ActiveDocument.SummaryInfo.RevisionNumber subject = ActiveDocument.SummaryInfo.subject title = ActiveDocument.SummaryInfo.title MsgBox "The standard drawing properties are " & vbCrLf & _ "Title = " & title & vbCrLf & _ "RevisionNumber = " & revision & vbCrLf & _ "Subject = " & subject & vbCrLf & _ "Author = " & author & vbCrLf & _ "Comments = " & comments & vbCrLf & _ "HyperlinkBase = " & hyperLink & vbCrLf & _ "Keywords = " & keyWord & vbCrLf & _ "LastSavedBy = " & lastSave & vbCrLf End Sub
Statistics: Posted by QuanNguyen — Sun Jul 16, 2023 6:39 pm
Statistics: Posted by QuanNguyen — Wed May 17, 2023 2:39 am
Statistics: Posted by sln8458 — Mon Feb 27, 2023 1:13 am
Statistics: Posted by RaHo — Sun Feb 19, 2023 2:55 pm
Statistics: Posted by QuanNguyen — Sat Feb 18, 2023 7:37 am
Statistics: Posted by Danielm103 — Sat Feb 18, 2023 3:57 am
Statistics: Posted by Danielm103 — Sat Feb 18, 2023 3:38 am
Statistics: Posted by kpr — Sat Feb 18, 2023 1:54 am
This is because the file "IntelliCAD.DotNetClassic.Samples.props" was cut and pasted from another Intellicad (ITC) brand. There is one property section that needs to be changed to reflect the correct registry entry in order for Visual Studio to understand where CMS Intellicad is installed. Here is the modified section:Error You are building .NET samples from the 'api-*.zip' archive, but IntelliCAD install location has not been found. You need to install IntelliCAD (.msi) or repair it.
Code:
<PropertyGroup Condition="'$(IsApiBuild)'=='true'"> <IcadVersion>11.1</IcadVersion> <IcadBuildDir>$(MSBuildThisFileDirectory)Build\VC.$(PlatformToolset)</IcadBuildDir> <IcadStageDir>$(IcadBuildDir)\$(Configuration) $(TargetArchSuffix)</IcadStageDir> <IcadOutDir>$(IcadStageDir)</IcadOutDir> <IcadIntDir>$(IcadOutDir)\Int\$(MSBuildProjectName).dir</IcadIntDir> <RegInstallDir Condition="$(Configuration.Contains('Pro')) And $(Platform.Contains('64'))">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\CMS\CMS IntelliCAD $(IcadVersion) Premium Edition Plus x64\$(IcadVersion)', 'InstallDir', null, RegistryView.Registry64))</RegInstallDir> <RegInstallDir Condition="$(Configuration.Contains('Pro')) And !$(Platform.Contains('64'))">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\CMS\CMS IntelliCAD $(IcadVersion) Premium Edition Plus x86\$(IcadVersion)', 'InstallDir', null, RegistryView.Registry32))</RegInstallDir> <RegInstallDir Condition="!$(Configuration.Contains('Pro')) And $(Platform.Contains('64'))">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\CMS\CMS IntelliCAD $(IcadVersion) Premium Edition x64\$(IcadVersion)', 'InstallDir', null, RegistryView.Registry64))</RegInstallDir> <RegInstallDir Condition="!$(Configuration.Contains('Pro')) And !$(Platform.Contains('64'))">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\CMS\CMS IntelliCAD $(IcadVersion) Premium Edition x86\$(IcadVersion)', 'InstallDir', null, RegistryView.Registry32))</RegInstallDir> <IcadBinPath>$(RegInstallDir)</IcadBinPath> </PropertyGroup>
Statistics: Posted by buck_taylor — Sun Feb 12, 2023 10:33 am
Code:
#Create Pointspoints = icad.Library.CreatePoints()points.Add()points[0].x = 0points[0].y = 0points.Add()points[1].x = 10points[1].y = 10points.Add()points[2].x = 10points[2].y = 0# Draw Polylinepline = doc.ModelSpace.AddPolyLine(points)
Statistics: Posted by matt8200 — Mon Feb 06, 2023 1:36 pm
Code:
import win32com.client# Create an instance of IntelliCADicad = win32com.client.Dispatch("Icad.Application")# Make the IntelliCAD application visibleicad.Visible = True# Get the current documentdoc = icad.ActiveDocumentprint(doc.Name)# Create a new layerdoc.Layers.Add('New Layer')# Create pointsp1 = icad.Library.CreatePoint(0, 0)p2 = icad.Library.CreatePoint(10, 10)p3 = icad.Library.CreatePoint(10, 0)# Draw lineline = doc.ModelSpace.AddLine(p1, p2)# Draw Texttext = doc.ModelSpace.AddText('Hello World', p1, 1)# Draw Polylinepline = doc.ModelSpace.AddPolyLine([p1, p2, p3])
Statistics: Posted by matt8200 — Mon Feb 06, 2023 12:37 pm