It were useful to post also the dialog box definition; however to move the label from polyline based on his width try:
And some comments after a quick glance on the code:Code:... (setq fg (cons 10 '(0.0 0.0))) (setq hg (cons 11 (setq r2 (polar mpt (dir lan (+ 1)) (+ width (* 0.5 (getvar "TEXTSIZE"))))))) ...
- Instead of multiple IF's, check the COND function:
- The PREFIX variable took value from this list:Code:(cond ((= wdth 1.75) (setq label "1.75x")) ((= wdth 2.5) (setq label "I-JOIST/BEAM")) ((= wdth 3.5) (setq label "3.5x")) ((= wdth 5.25) (setq label "5.25x")) ((= wdth 7) (setq label "7x")) )
but later is compared with some unrelated stuff:Code:'("1 ply" "2 ply" "3 ply")
- You try to restore the current layer, but the LAYERSET variable is never assigned.Code:(= preffix "1.5") ... (= preffix "1.5") ... (= preffix "3") ...
- You assign values to a lot of variables, FG, R1, HG and so, that are never used.Code:(setvar "clayer" layerset)
- Try to use localized variables to avoid further conflicts.
- Why reset FILEDIA? It doesn't interfere with custom dialogs.
- Try more consistency in code - you have a function definition at the middle of routine; also hard to follow formatting.
By using code tags instead of HTML, will shrink the post for better appearance.




Reply With Quote


Bookmarks