| Author |
Message |
juno
Guest
|
Posted:
Fri Mar 18, 2005 8:38 pm Post subject:
Radiuses & Diameter Dimensions |
|
|
I hate the VBA way of creating dimensions (without ghosting). So I would like to utilize AutoCAD dimensions but I would like to modify the settings per dimension before the user inserts them into the drawing. For instance I would like to change the Dim Suffix.
I am not even sure if that is possible, if not then may be I can change the dimension after the insertion.
What do you think? Any help, advice and snippet of code would be appreciated.
Thank you in advance,
|
|
| Back to top |
|
 |
Paul Richardson
Guest
|
Posted:
Sat Mar 19, 2005 3:18 am Post subject:
Re: Radiuses & Diameter Dimensions |
|
|
If your planning on using the sendcommand than
you could add xData to the dims which represents
the prefix and suffix overides. Don't know if you
could add it before hand with the sendcommand.
Must be a way. Anyone?
Check the xData on dims with overides and you see
something like the following. I did a quick test and
it seems to work fine.
gl
Paul
Dim DataType(7) As Integer
Dim Data(7)
DataType(0) = 1001: Data(0) = "ACAD"
DataType(1) = 1000: Data(1) = "DSTYLE"
DataType(2) = 1002: Data(2) = "{"
DataType(3) = 1070: Data(3) = 3
DataType(4) = 1000: Data(4) = "Prefix<>Suffix"
DataType(5) = 1070: Data(5) = 288
DataType(6) = 1070: Data(6) = 1
DataType(7) = 1002: Data(7) = "}"
"juno" <nospam@address.withheld> wrote in message
news:2454858.1111160354335.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | I hate the VBA way of creating dimensions (without ghosting). So I would
like to utilize AutoCAD dimensions but I would like to modify the settings
per dimension before the user inserts them into the drawing. For instance I
would like to change the Dim Suffix.
I am not even sure if that is possible, if not then may be I can change
the dimension after the insertion.
What do you think? Any help, advice and snippet of code would be
appreciated.
Thank you in advance, |
|
|
| Back to top |
|
 |
Paul Richardson
Guest
|
Posted:
Sat Mar 19, 2005 4:11 am Post subject:
Re: Radiuses & Diameter Dimensions |
|
|
If you already have the dims placed than
you can just use the vba methods for
prefix and suffix...much cleaner and eaiser.
"Paul Richardson" <prichardson@adelphia.net> wrote in message
news:423b53a5$1_1@newsprd01...
| Quote: | If your planning on using the sendcommand than
you could add xData to the dims which represents
the prefix and suffix overides. Don't know if you
could add it before hand with the sendcommand.
Must be a way. Anyone?
Check the xData on dims with overides and you see
something like the following. I did a quick test and
it seems to work fine.
gl
Paul
Dim DataType(7) As Integer
Dim Data(7)
DataType(0) = 1001: Data(0) = "ACAD"
DataType(1) = 1000: Data(1) = "DSTYLE"
DataType(2) = 1002: Data(2) = "{"
DataType(3) = 1070: Data(3) = 3
DataType(4) = 1000: Data(4) = "Prefix<>Suffix"
DataType(5) = 1070: Data(5) = 288
DataType(6) = 1070: Data(6) = 1
DataType(7) = 1002: Data(7) = "}"
"juno" <nospam@address.withheld> wrote in message
news:2454858.1111160354335.JavaMail.jive@jiveforum2.autodesk.com...
I hate the VBA way of creating dimensions (without ghosting). So I would
like to utilize AutoCAD dimensions but I would like to modify the settings
per dimension before the user inserts them into the drawing. For instance
I would like to change the Dim Suffix.
I am not even sure if that is possible, if not then may be I can change
the dimension after the insertion.
What do you think? Any help, advice and snippet of code would be
appreciated.
Thank you in advance,
|
|
|
| Back to top |
|
 |
juno
Guest
|
Posted:
Mon Mar 21, 2005 7:50 pm Post subject:
Re: Radiuses & Diameter Dimensions |
|
|
Thank you Paul for the answer,
I was able to accomplish what I was trying to do by changing the variable [ThisDrawing.SetVariable "dimpost", ""]. But I am interested to get to understand how to use you method. Can you please elaborate on what do I do next after I set up the arrays.
-Juno |
|
| Back to top |
|
 |
Paul Richardson
Guest
|
Posted:
Mon Mar 21, 2005 8:37 pm Post subject:
Re: Radiuses & Diameter Dimensions |
|
|
Juno, AutoCAD stores the overrides as xData with your object. We can
also store Data in objects with xData, via group codes i.e...
1001: Name to Call xData
1000: string data
1040: double data
gl
Paul
sample:
Dim someDouble1 As Double: someDouble1 = 25.5
Dim someDouble2 As Double: someDouble2 = 50.5
Dim DataType(4) As Integer
Dim Data(4), outData, outValue
DataType(0) = 1001: Data(0) = "NameOfData"
DataType(1) = 1000: Data(1) = "someString1"
DataType(2) = 1000: Data(2) = "someString2"
DataType(3) = 1040: Data(3) = someDouble1
DataType(4) = 1040: Data(4) = someDouble2
yourObject.SetXData DataType, Data
yourObject.GetXData "NameOfData", outData, outValue
"juno" <nospam@address.withheld> wrote in message
news:25708162.1111416633745.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | Thank you Paul for the answer,
I was able to accomplish what I was trying to do by changing the variable
[ThisDrawing.SetVariable "dimpost", ""]. But I am interested to get to
understand how to use you method. Can you please elaborate on what do I do
next after I set up the arrays.
-Juno |
|
|
| Back to top |
|
 |
Paul Richardson
Guest
|
Posted:
Tue Mar 22, 2005 3:43 pm Post subject:
Re: Radiuses & Diameter Dimensions |
|
|
Check out Juerg's post "Extended Entity Data" in the
Customization Group, much more info...
"Paul Richardson" <prichardson@adelphia.net> wrote in message
news:423eea43$1_3@newsprd01...
| Quote: | Juno, AutoCAD stores the overrides as xData with your object. We can
also store Data in objects with xData, via group codes i.e...
1001: Name to Call xData
1000: string data
1040: double data
gl
Paul
sample:
Dim someDouble1 As Double: someDouble1 = 25.5
Dim someDouble2 As Double: someDouble2 = 50.5
Dim DataType(4) As Integer
Dim Data(4), outData, outValue
DataType(0) = 1001: Data(0) = "NameOfData"
DataType(1) = 1000: Data(1) = "someString1"
DataType(2) = 1000: Data(2) = "someString2"
DataType(3) = 1040: Data(3) = someDouble1
DataType(4) = 1040: Data(4) = someDouble2
yourObject.SetXData DataType, Data
yourObject.GetXData "NameOfData", outData, outValue
"juno" <nospam@address.withheld> wrote in message
news:25708162.1111416633745.JavaMail.jive@jiveforum2.autodesk.com...
Thank you Paul for the answer,
I was able to accomplish what I was trying to do by changing the variable
[ThisDrawing.SetVariable "dimpost", ""]. But I am interested to get to
understand how to use you method. Can you please elaborate on what do I
do next after I set up the arrays.
-Juno
|
|
|
| Back to top |
|
 |
|
|
|
|