Message 1 of 4
BlockInsert Method
Not applicable
10-04-1999
03:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am pretty new to customizing Acad 2000 and need some advise with a couple
of things.
I am making a tiny application for setting up a new drawing. The user will
select papersize, scale, title-field etc and the new drawing will then be
created. This works just fine until the part where I would like to insert
(and scale) the title-field (external .dwg-file). The error-message is:
Run-time error '-2145320939 (80210015)'
Invalid argument Zscale in InsertBlock
The actual code that generates the error looks like this:
============================
' Create a title in model space
If chkTitle.Value = True Then
insertionPnt(0) = iLimitX
insertionPnt(1) = 0
insertionPnt(2) = 0
sTitleField = "K:\Tf_ke-3.dwg"
Set blockObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt,
sTitleField, dScale, dScale, 0#, 0)
End If
============================
All variables are declared. dScale is a double, and has values upon
inspection.
One other thing I just remembered. How can I access the properties connected
with the 'Drawing Units' dialog (_units-command). Specifically I would like
to programmatically alter the 'Precision'-property.
Any advise are welcome!
-Morten
of things.
I am making a tiny application for setting up a new drawing. The user will
select papersize, scale, title-field etc and the new drawing will then be
created. This works just fine until the part where I would like to insert
(and scale) the title-field (external .dwg-file). The error-message is:
Run-time error '-2145320939 (80210015)'
Invalid argument Zscale in InsertBlock
The actual code that generates the error looks like this:
============================
' Create a title in model space
If chkTitle.Value = True Then
insertionPnt(0) = iLimitX
insertionPnt(1) = 0
insertionPnt(2) = 0
sTitleField = "K:\Tf_ke-3.dwg"
Set blockObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt,
sTitleField, dScale, dScale, 0#, 0)
End If
============================
All variables are declared. dScale is a double, and has values upon
inspection.
One other thing I just remembered. How can I access the properties connected
with the 'Drawing Units' dialog (_units-command). Specifically I would like
to programmatically alter the 'Precision'-property.
Any advise are welcome!
-Morten