Dimension Style not working for Radial Dimensions - CadLib 4.0
Joe B
3/5/2014 4:00 PM
|
---|
I am having trouble getting a Dimension Style to display correctly on a Radial Dimension when initially viewing a DWG file with that dimension in it inside of AutoCAD. Here is a picture illustrating it:
The rightmost dimension was placed there by my sample CadLib application against the Arc drawn there. The leftmost dimension was created by me in AutoCAD by copying the other dimension and pasting it back into the drawing.
Basically until you manually update the Radial dimension somehow in AutoCAD it won't show the updated dimension style and just falls back to the default. Note that the left dimension has a different font and the arrow is set to point from the outside. I've done work with Linear dimensions and they do not seem to have this problem and correctly display different Fonts and end markers without issue immediately upon opening a drawing in AutoCAD.
I've updated to the latest version of CadLib available as of last week (4.0.35.85) just to be sure nothing has changed and still am having this problem. My sample application is very simplified in that it just creates an Arc, and puts the dimension on it with a few changes to the style for it (namely the Font and arrow placement). I even put in extra code to pull the dimension back out from the Model and run GenerateBlock() on it per some advice from Wout in another thread on the forum, but that didn't seem to change anything.
I've attached a copy of a drawing that I pulled the screenshot from. I'm not sure if I am just using CadLib incorrectly here, if this is an AutoCAD bug, or if there is some issue with Dimension Styles and Radial Dimensions in CadLib. If you need code snippets or additional material please let me know.
|
Wout
3/6/2014 10:28 AM
|
---|
Hi,
Code snippet would be useful indeed to see what is done exactly. (E.g. you can modify the dimension style, or just the overrides for the dimension, or creating a new dimension style and not adding it to DxfModel.DimensionStyles).
- Wout
|
Wout
3/6/2014 12:11 PM
|
---|
There is a duplicate text style MARVSTANDARD in the file, this might have something to do with it.
- Wout
|
Joe B
3/6/2014 7:47 PM
|
---|
Oops, thanks for pointing that out. Fixed that issue but my previous problem still persists. I've attached an updated drawing with everything stripped out, and here is a condensed function I put together of what we are using:
Visual Basic Code: Dim dimLayer As New DxfLayer( |
Wout
3/10/2014 11:05 PM
|
---|
Thank you for the code snippet. I've fixed the problem with the text style and improved the dimension line positioning. There's probably a little more refinement needed, but I think it should be a lot more usable now. I've uploaded a new CadLib 4.0 version, so feel free to try it out.
- Wout
|
Joe B
3/14/2014 12:52 PM
|
---|
Got the latest CadLib 4.0 and this looks to be working much better now. Thanks for the help.
|