TheSwamp
CAD Forums => CAD General => Topic started by: MSTG007 on January 02, 2018, 11:35:19 AM
-
I am trying to understand (prob a noob thing) how dimension style overrides work.
I have a detail that has its own Style. However, in some drawings I insert the detail and go to explode it to edit it, the test and dim style is no correct. (goes big, etc.)
I have a routine I try to use, but it always shows up in the dimension style manager under the Style Name as <style override>
(command "-dimstyle" "Variables" "DETL" "DIMADEC" "4" "DIMASZ" "0.1" "DIMAUNIT" "1" "DIMCEN" "0.00" "DIMCLRT" "256" "DIMDEC" "2" "DIMEXE" "0.09" "DIMGAP" "0.04" "DIMTAD" "1" "DIMTDEC"
"2" "DIMTIH" "OFF" "DIMTOH" "OFF" "DIMTXSTY" "DETL" "DIMTXT" "0.07" "-dimstyle" "apply" "all" "")
However, if I do not use the routine, and manually edit each field in the Dimension Style Manager. then explode the detail, everything adjusts normally.
Long story short. I use the same detail in some drawings, and explode it to edit and everything works as it should. I use the same detail in other drawings and when I explode it to edit, it does not show correctly and I have to edit all the fields.
Any help would be great!
-
The issue is probably related to conflicting dimension styles. If you compare the block source drawing with the target drawing that displays the problem, you will find that they have dimension styles with the same name but with different settings. IMO it would be less confusing and more logical if dimensions would automatically be updated upon insertion of a drawing file. But that does not happen. As you have found out exploding the block will trigger an update. So will changing a dimension style setting.
-
Gotcha. So in this case, the routine I have would work for this application.
I guess I can ask this, right now I just have the basic routine that converts the everything in the drawing. How hard is it, to make it a selection set? (Where I can window the details I want to apply the updated correct style too)?
-
I have a hard time understanding what you are trying to say. Contrary to what you seem to suggest you are not a noob (you have joined this forum in 2004), so please clarify.
In the meantime here is some code that will trigger an update of those nested dimensions. Both functions (UpdateDimBlks and UpdateDimBlksAlt) should have the same effect.
(defun c:UpdateDimBlks
( / doc elst old
) (entmod (subst (cons 40 (* 1.0001 (cdr old
))) old elst
)) ; Temporarily change the DIMSCALE. )
)
(defun c:UpdateDimBlksAlt
( / doc
) )
(entmod (entget (vlax
-vla
-object
->ename obj
))) ; Vla-update has no effect. )
)
)
)
)
-
hey thank you for the info. Apparently, I just had re-read what I was asking. don't know why I was asking that... lol.