Search the Community
Showing results for tags 'style'.
-
Set MLeader to Existing MLeader Style via LISP
parkerdepriest posted a topic in AutoLISP, Visual LISP & DCL
Hello, I am trying to create a lisp routine that sets all existing MLEADERs to a certain pre-set MLEADERSTYLE, the equivalent of doing a Quick Select for Mleaders, and setting the style under the properties window. I was able to write a similar routine that selects all dimensions and sets them to a certain DIMSTYLE, using entmod and DXF code 3 for dimstyle. So far, I have not been able to find a group code for MLEADERSTYLE Any help would be greatly appreciated! (defun C:dimstylechange (/ ENTITIES NO_OF_ENTITIES SSPOSITION ENTITY_NAME OLD_ENTLIST NEW_STYLE NEW_ENTLIST) (setvar "CMDECHO" 0) (setq ENTITIES (ssget "X" '((0 . "DIMENSION")))) (setq NO_OF_ENTITIES (sslength ENTITIES)) (setq SSPOSITION 0) (repeat NO_OF_ENTITIES ;***CHANGE STYLE*** (setq ENTITY_NAME (ssname ENTITIES SSPOSITION)) (setq OLD_ENTLIST (entget ENTITY_NAME)) (setq OLD_STYLE (assoc 3 OLD_ENTLIST)) (setq NEW_STYLE (cons 3 "BCR 11x17")) (setq NEW_ENTLIST (subst NEW_STYLE OLD_STYLE OLD_ENTLIST)) (entmod NEW_ENTLIST) ;***CHANGE LAYER*** (setq OLD_ENTLIST (entget ENTITY_NAME)) (setq OLD_STYLE (assoc 8 OLD_ENTLIST)) (setq NEW_STYLE (cons 8 "DIM")) (setq NEW_ENTLIST (subst NEW_STYLE OLD_STYLE OLD_ENTLIST)) (entmod NEW_ENTLIST) (setq SSPOSITION (1+ SSPOSITION)) ) (command ".CHPROP" ENTITIES "" "C" "BYLAYER" "LT" "BYLAYER" "") (princ (strcat "\n..." (rtos NO_OF_ENTITIES 2 0) " Dimension(s) changed...")) (setvar "CMDECHO" 1) (princ) ) dimstylechange.LSP -
How to select "exact" custom multileader style
rhgrafix posted a topic in AutoLISP, Visual LISP & DCL
Hi, I searched and found some code on here that did not go as deep as I need it to. A few weeks ago I made a multileader with the hexagon and enabled the large dot on the end of the leader, it was MLS "STANDARD", my first mistake. But 1st, I customized the _TagHexagon so it had a masked mtext attribute. At the time I didn't know that Quick Select and Object Selection Filters did not differentiate between home made mleaders and mleaders with mtext and a simple leader. The reason I need to separate them, sometimes I come into a dwg and all the MLs are linespace factor of 1, I want to grab them all with a filer and make them .9, looks so much better, but it also grabs my custom MLs because I left the style name as STANDARD, once they are all selected, the properties fields will not show the "line space factor" field so I have to pick each mleader, and there are a lot of them! There's nothing else unique to filter, all on layer TEXT, BYLAYER, etc. Has anyone written code to select STANDARD AND Hexagon? Or STANDARD AND MLs with leaders with dots, OR filled arrow heads etc? I am not great at lisp but I can tweak it, insert names of my own styles, blocks etc. In the mean time, I will make my new custom MLs with Color White or put the 1st one in the dwg on a different layer but I have made 30 dwgs full of these mixed MLs. Thanks much if you can help! BTW, I'm using Acad 2014 -=(RLH)=--
- select
- multileader
-
(and 3 more)
Tagged with:
-
Hello, I cannot find the default settings that control the point label style for a surface. I start a new drawing with no template, import an xml surface, turn on some contours and the points. I cannot find where that sneaky elevation style is hidden in order to change it. All help is greatly appreciated. Regards, phil
-
I wanted to create a new thread since it's a different problem even though it is from a previous thread. Since I never know how many instances of a font that needs changing (SLDTEXTSTYLE) I wanted to create a counter. http://www.cadtutor.net/forum/showthread.php?91375http:// Digging around I found a way to create my counter number from this thread: http://www.cadtutor.net/forum/archive/index.php/t-76290.html How do I make the CNT a subroutine and call it from C:SWT (defun c:cnt () (setq la (cdr (assoc 2 (tblnext "STYLE" T)))) (setq lal (list la)) (while (/= (setq la (cdr (assoc 2 (tblnext "STYLE")))) nil) (setq lal (append lal (list la)) ) ) (setq LEN (length lal)) ) (defun c:swt (/ i s) (Princ "\nFinds all SW Text Styles, replaces with ROMANS Font:") (if (not (tblsearch "STYLE" "ROMANS")) (progn (command "_.STYLE" "ROMANS" "ROMANS") (while (> (getvar "CMDACTIVE") 0) (command "")))) (setq i 0) (repeat 9 ; All my LEN from the subroutine here? (setq s (strcat "SLDTEXTSTYLE" (itoa i))) (if (tblsearch "STYLE" s) (progn (command "_.STYLE" s "ROMANS") (while (> (getvar "CMDACTIVE") 0) (command "")))) (setq i (1+ i))) (princ)) And of course if there is a "better way" I'm always open to that too!! Thanks Much!
-
Is it possible to make this more compact? (DEFUN C:TEST () (if (/= (tblsearch "STYLE" "ROMANS")) (COMMAND "-STYLE" "ROMANS" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE0")) (COMMAND "-STYLE" "SLDTEXTSTYLE0" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE1")) (COMMAND "-STYLE" "SLDTEXTSTYLE1" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE2")) (COMMAND "-STYLE" "SLDTEXTSTYLE2" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE3")) (COMMAND "-STYLE" "SLDTEXTSTYLE3" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE4")) (COMMAND "-STYLE" "SLDTEXTSTYLE4" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE5")) (COMMAND "-STYLE" "SLDTEXTSTYLE5" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE6")) (COMMAND "-STYLE" "SLDTEXTSTYLE6" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE7")) (COMMAND "-STYLE" "SLDTEXTSTYLE7" "ROMANS" "" "" "" "N" "N" "N") (if (= (tblsearch "STYLE" "SLDTEXTSTYLE8")) (COMMAND "-STYLE" "SLDTEXTSTYLE8" "ROMANS" "" "" "" "N" "N" "N") (PRINC)) Guidance if so please?
- 12 replies
-
- style
- solidworks
-
(and 2 more)
Tagged with:
-
We have set dimension styles and viewport scales in the office for standards, but some drawings don't have all of them loaded, same thing with the plot scales. What kind of file is it (dwt, lsp?) and how do I import it so they all are options to pick for all drawings so I don't have to make them manually?
-
why do multileaders and dimensions have style commands and dialogue box (dimstyle, multileaderstyle) but text doesn't? It seems like it would be essential, or am I missing something. Just saying.
-
I would like to delete a certain label style (that is used for surfaces) using vb.net code. Can someone help me please?
-
Assemblies are built with cross hatching, or shading, built in - can I style (edit) the cross hatch? I'd like to be able to hide/show the hatching, or at the very least change the color to what will print as a half tone. Any tips? I've looked everywhere, but had no luck.
-
Hello everyone!! I am a rookie in autolisp. I need help in figuring this out.. I wish to find Mtext "J" of a particular style (say ROMANS) in the drawing and retrieve its position (x,y coordinates). I am trying to replace all the occurrences of the text with a block (say "star") at their respective locations. I found lisp programs to find text, but i cant seem to figure out how to use its attributes to proceed further. eagerly awaiting responses...
- 14 replies
-
- properties
- find
-
(and 2 more)
Tagged with:
-
I am trying to write a routine to load a new Plot Style Table, and then set a certain Plot Style Name to all layers. Here is the code I use to set the new Plot Style Table, and it works fine: (vla-put-StyleSheet (vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object)) ) "BCR Plot Style.stb" ) My problem is that it seems like the Plot Style Names have to be "loaded" manually. When I run (dictsearch (namedobjdict) "ACAD_PLOTSTYLENAME") it *should* show me the new plot style names, but it doesn't, not until I've gone into the Layer Property Manager and changed a layer to each of the new Plot Style Names once. Please help!
-
How to create this baseline dimension style in Inventor 2008?
zmarcoz posted a topic in Autodesk Inventor
Please help. This is my company format. I need to find out how to set the following format. Thanks. If you know how to do it in other version, please tell me too. I guess different version would still use similar style setting method. http://images.books24x7.com/bookimages/id_9010/fig212_01.jpg -
My question: How do I change the font styles of multiple mtext's. My solution: Select all the boxes, type mo for properties, then change the style in the properties window. To make this simpler in the future I put all the text boxes in their own layer so I can use qselect to select them all quickly.
-
When I draw two pipes that interfere, I want different styles on the profile, which I've been able to do for a while. I also want a style on the plan that will let me indicate the crossing. The classic indicator is a semicircular break in one pipe. So far I haven't found anything that lets me do that with a pipe object. Anyone know about such a style feature?
-
- pipe
- interference
-
(and 1 more)
Tagged with:
-
call tblobjname on a drawing opened as ObjecDBX! Is it possible???????
Ahankhah posted a topic in AutoLISP, Visual LISP & DCL
Hi all, the following code shows whether a text style is annotative (written by Lee): (defun LM:isAnnotative (style / object annotx) (and (setq object (tblobjname "STYLE" style)) (setq annotx (cadr (assoc -3 (entget object '("AcadAnnotative"))))) (= 1 (cdr (assoc 1070 (reverse annotx)))) ) ) Is it possible to call tblobjname on a drawing which is opened as a ObjectDBX?- 8 replies
-
- objectdbx
- annotation
-
(and 2 more)
Tagged with:
-
How to find Vertical Effect is ON in Text Style
Ahankhah posted a topic in AutoLISP, Visual LISP & DCL
Hi everybody, as most of you know, vla-get-TextGenerationFlag function returns a number showing the condition of Upside Down and Backwards toggles inside Effects region of STYLE command's dialog. How is it possible to find out whethere Vertical toggle is ON or OFF?- 9 replies
-
- textgenerationflag
- text
-
(and 2 more)
Tagged with:
-
Gday All we have recently changed our standard text style from ISOCP to ARIAL NARROW. i have a drawing with text in the blocks that is still ISOCP, i would like to know how to change all the block attributes text style in one go. I used to know this, but have forgotten, i cant find it in help or in net searches. perhaps someone here knows..
-
Type Style at the command prompt. Type S to change the style on the fly. Type a new style name. The next prompt shows you the height of the new style, the subsequent text is in the new style, but that prompt still displays the default style name. Yet another bug.
-
I need to create a dimensioning style for an A4 format. So what does this imply? This is for an exam I have in 2 days, so any help would be much appreciated . I have some other questions to but I'll take them one at a time.
- 12 replies
-
- dimensioning
- a4 format
-
(and 1 more)
Tagged with:
-
Does anyone know how to add the profile elevation to the section view band style? I have a case where the profile is theoretical because it is under a median for the majority of the project. Because of this, I have my assemblies 4” above the profile grade line. I would like the sections to show the existing elevation (easy enough) and the profile elevation, not the section elevation. Any suggestions? Thanks. Quick update for anyone else with this issue: For a temporary answer, I made a second corridor without an offset in the assembly and sampled it in the section view, but did not draw them, then used that section elevation.
-
I have a topography drawing with lots of numbers in it. Plotting in A3 paper, doesn't show the numbers. I tried to change the height of numbers globally through the style command. The present height is 0.3. I change it to 6 but nothing happens in the monitor. However when I change the oblique angle, I can see the effect on the monitor. BTW the style name is "standard" and fonta name is: txt.shx Am I doing something wrong? How can I change the height for whole numbers in one step?
-
Hello all Long time lurker and have always been able to find answers to my questions except this one. I am using a label note to label several (100+) features across a large project. The label is going to read "Crossing Number 100" and each will read the same with the # increasing..."Crossing Number 101" which will be equated to a table. Is there a way to use the Label Note feature and have a field or compenent so that every time I insert this label it automatically inputs the next sequential number? This will save time instead of going through and editing the text of every label across the whole drawing. Thanks for all the help!
- 4 replies
-
- sequencing
- note
-
(and 3 more)
Tagged with: