I am using volo view express in my vb6 application. Can any one give me code for zoom window using volo view express in vb6.I have code for zoom extends. Please help me.Its urgent
I am using volo view express in my vb6 application. Can any one give me code for zoom window using volo view express in vb6.I have code for zoom extends. Please help me.Its urgent
Hi,
Can any one help vba code for autocad.I want to extract only the dimensions from autocad drawing and export to excel.Already I have code to capture block attributes.But i dont want to capture from block attributes.I want to capture from drawing only.Some one help me.Its urgent
The code below will extract all dimensions except radius, and diameter. Per shamsam1's request. BTW VBA is a subset of VB so this should work in VB with little effort.
So far as getting voloview to do a zoom window, you will have to launch spy++ and write to a file and search the file until you find it. Yes it is a long and difficult process. Good Luck.
[VBA]
Sub WriteDimMeasurement()
Dim ssetA As AcadSelectionSet
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
Dim I As Long
Dim groupCode() As Integer
Dim dataCode As Variant
gpCode(0) = 0
dataValue(0) = "Dimension"
groupCode = gpCode
dataCode = dataValue
Set ssetA = Aset("DimDelete")
ssetA.Select acSelectionSetAll, , , groupCode, dataCode
On Error Resume Next
For I = ssetA.Count - 1 To 0 Step -1
If ssetA(I).ExtLine1Linetype >= 0 Then
'check for an extension line -
' a leader radius and diameter does not have an
'extension line so it throws an error
If Err.Number > 0 Then
Err.Clear
Else
'place code to write to excel
Debug.Print ssetA(I).Measurement
End If
End If
Next
On Error GoTo 0
ssetA.Delete
Set ssetA = Nothing
End Sub
[/VBA]
hi tommy
i get an erro cannt asssing arry to groupCode
1. groupCode = gpCode
Cant assign array to groupcode
2. Set ssetA = Aset("DimDelete")
Aset not defined
What is datatype of Aset?
also Aset not defined.
guide me regarding this
Hi Tommy,
Thanks for your reply.But while running the code errors are displaying in the following two lines
1. groupCode = gpCode
Cant assign array to groupcode
2. Set ssetA = Aset("DimDelete")
Aset not defined
What is datatype of Aset?
Thanks
Saranya
1. groupCode = gpCode
Cant assign array to groupcode
Try
[VBA]
Dim groupCode(0) As Integer
groupCode(0) = gpCode (0)
[/VBA]
I don't know why that doesn't work, it works in VB6 and acad 2007 VBA
2.
Forgot a function sorry.
[VBA]
Function Aset(iSSetName As String) As AcadSelectionSet
Dim ssetA As AcadSelectionSet
On Error Resume Next
Set ssetA = ThisDrawing.SelectionSets.Add(iSSetName)
If Err.Number <> 0 Then
Set ssetA = ThisDrawing.SelectionSets(iSSetName)
ssetA.Delete
Set ssetA = ThisDrawing.SelectionSets.Add(iSSetName)
Err.Clear
End If
On Error GoTo 0
Set Aset = ssetA
End Function
[/VBA]
Thank you very much Tommy.It works great.
Saranya
I would like to be able to do the same thing, i need to export dimensions from an auto cad file into excel so that i can load them from excel into cayman, (a gui client) if its possible i would like to know how.
do u want a lisp program or a vb.6 progam to export
check the earlier post u will get it..
u r requirement still not clear.
u want attributes,block attributes,or dimensions ....
Originally Posted by shamsam1