AutoCAD Visual LISP / AutoLISP :: Finding And Replacing Very Special Characters

May 15, 2013

Is there a way to find and/or replace "very" special characters like [carriage return], [backspace] or even [tab mark], considering that the first thing that comes to mind when saying special characters is the standard and extended ASCII only.

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Using Special Characters In Custom Command

May 4, 2012

I'm trying to write a simple Custom Command that sets any layer that matches "$-*" to a specific color. But as soon as AutoCAD sees the $, it thinks I'm trying to do a DIESEL expression. Supposedly, the quote marks specify that the enclosed characters should be treated as plain text, but that doesn't happen.Here's what I've got:

^C^C-LAYER;C;252;"$-*";;

And this is what I get:

Command: -LAYERCurrent layer: "$-HATCH-00-002-PW-BOAT"Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: CNew color [Truecolor/COlorbook] : 252Enter name list of layer(s) for color 252 <$-HATCH-00-002-PW-BOAT>: "No matching layer names found.Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:
It stops, hanging at the incompleted -LAYER command prompt. 

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replacing Characters In A Text File

Sep 13, 2012

Replacing characters in a text file.

I solved the following Lisp routine chore. I have this csv file of coordinates (and many more) that comes from a total station:1,100,100,10,50

2,100,200,12,50
3,200,200,12,50
4,200,100,10,51

and should replace the code after the last comma like this:1,100,100,10,.50
2,100,200,12,.50
3,200,200,12,.50
4,200,100,10,..50

To be able to generate the topographic map. And I have this code but does not work properly:

(defun c:cod (/ filename fileopenr readline)
(if (setq filename (getfiled "!!! SELECT *.csv FILE COORDINATE:... ¡¡¡" "c:/" "csv" 0 ))
(progn (setq fileopenr (open filename "w"))
(while (setq readline (read-line fileopenr))
[[code].......

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Converting Special Layer With Special Line Weight To Special Layer Name

Aug 9, 2013

i have line in the drawing that exists on layer A-Wall it has different lineweight 0.05 from true wall. Now usually my routine : i select this line and then select similar to convert it to layer glazing.

i need lisp that by one command convert the objects on layer A-wall with layer 0.05 only to glazing.

View 9 Replies View Related

AutoCad :: Finding Special Characters And Symbols

Mar 14, 2012

I need to find the tool bar or palette that has the special characters and symbols ( Microns, Center Line, etc.)

ACLT 2012

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replacing Text In Tables?

May 30, 2013

Consider the following

(if (ssget "_X" '((0 . "ACAD_TABLE")(1 . "PIPE LIST")))(progn (vlax-for a  (setq ss   (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object)))) (repeat (setq r (vla-get-rows a))(setq r (1- r) c -1)(repeat (vla-get-columns a)
(if (eq "*PL*" (vlax-invoke a 'GetText r (setq c (1+ c)))) (vlax-invoke  a 'SetText r c "THREAD ONE END"))))) (vla-delete ss)));progn);if

Basically, it replaces this text inside a table:

1 1/2" NPTM - A53 - 3000LB - A-53 - 3000 LB

with:

thread both ends.

But I'm limited to the size of pipe, it's material and its pressure rating.  I can't change how the text in the field is populated.  It would be nice if, it did a search for NPTM, and when that string exists in the string, change it to "thread both ends".

Essentially right now, I have 46 lines (and growing) of different scenarios.  I just want the NPTM to trigger the string change.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Make Block Which Is Visible To Snap Only On Special Point

Dec 27, 2011

I want to make a block which is visible to snap only on a special point, say pivot point.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Chinese Characters In DCL Files?

Jan 19, 2012

I have some legacy custom .DCL files that we want to convert the user interfaces (text boxes, labels, etc) to Chinese characters.  Is that even possible in .DCL?

I have gotten our NET and VBA apps converted but not having much luck with the DCL files.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: ActiveX And Chinese Characters

Mar 26, 2013

we use AutoCAD 2013 english version also in China.

Have a look to t below process

(setq app (vlax-get-acad-object))
(setq actdoc (vla-get-activedocument app))
(setq actlay (vla-get-activelayout actdoc))      
(setq laynam (vlax-get-property actlay 'name))

 On a Chinese computer with Windows XP, the layout name via ActiveX is displayed correctly "A3 -布局-02" on the variable laynam.

But under Windows 7 64 Bit I get this "A3 -??-02". So all ActiveX objects with AutoLisp commands do not transfer the Chinese Unicode characters, also on a system in china.

But the pure lisp command (layoutlist) for example returns always the correct characters ("A3 -布局-02")

Do I need any Chinese dll’s for ActiveX dependent language? On my test PC I installed the file autocad_2013_traditional_chinese_language_pack_win_64bit in the hope I get shared files for ActiveX but this did not bring success.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Replacing Line With Block?

May 21, 2012

Lisp Routine that could replace a line at a specified maximum length with a block at the lines midpoint.

I would love to be able to replace all lines I select which are say less than 0.5m in length with a block at the lines.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replacing Substr(s) In String Variable

Feb 18, 2013

I write a code to replace strings in one string.for example

str="AutoDesk, AutoCAD, 2013, Electrical, 64Bit"
patt=", "
NewStr=" - "
==> result: "AutoDesk - AutoCAD - 2013 - Electrical - 64Bit"
;;replaces NewStr instead of Patt(s) in Str string(defun ReplaceStr (NewStr Patt Str)(While (> (vl-string-search ptt str) 0)(setq Str (vl-string-subst NewStr patt Str)) );;whilestr) ; usage;(ReplaceStr " - " ", " "AutoDesk, AutoCAD, 2013, Electrical, 64Bit")
==> result= ; error: bad argument type: (or stringp symbolp): nil

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Finding All JPG References In Drawings

Dec 31, 2013

I searched the groups and the closest discussion I could find was here but there didn't seem to be a clear cut solution. [URL]. I have a jpg file that I needed to apply some transparency to and saved it as a png file. I now want to delete the jpg file from the folder but it's being referenced in several drawings, and I don't know which ones. Is there a way to reverse the function of Reference Manager (perhaps with a different app), ie find all the drawing files that reference my jpg file?

Intel i7 3.33Ghz, 16Gb RAM
Nvidia Quadro 2000D
C3D 2012 SP4, holding off on C3D 2014
Win 7-64

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Finding 2 Points Along A Pline

Jul 7, 2013

I have plines of circuits that sometimes have T's (line goes along, then T's out then back to T point and then continues).

Here is example line -

(setq List_Pline (list (list 0 0) (list 1 1) (list 0.5 1.5) (list 1 1) (list 2 2) (list 3 3) (list 3.5 2.5) (list 3 3) (list 4 4)))

nth 0 = (0 0)
nth 1 = (1 1)     - T point
nth 2 = (0.5 1.5)
nth 3 = (1 1)     - T return point
nth 4 = (2 2)
nth 5 = (3 3)     - T point
nth 6 = (3.5 2.5)
nth 7 = (3 3)     - T return point
nth 8 = (4 4)

I need to be able to pick 2 points along the line and find the shortest route.

Examples - 

1st point at 1,1 and 2nd point at 3,3 - new line is nth's 3,4,5

1st point at 0,0 and 2nd point at 1,1 - new line is nth's 0,1

1st point at 2,2 and 2nd point at 3,3 - new line is nth's 4,5

1st point at 3,3 and 2nd point at 4,4 - new line is nth's 7,8

1st point at 0,0 and 2nd point at 3,3 - new line is nth's 0,1,2,3,4,5

1st point is 1,1 and 2nd point is 1,1 - new line is nth's 1,2,3

I've tried using vlax-curve-getParamAtPoint, but it returns 1st T point.

Synopsis of program -

Select Pline

Pick 1st point

check if on line

Pick 2nd point

check if on line

check if 2nd point is before 1st point, if so swap locations

find last nth of 1st point

find 1st nth of 2nd point

return list

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Removing Last Characters Of Block Name In Selected Object?

Jul 29, 2013

When i export revit drawing with revit family 

the revit family become block in autocad like this

M_Single-Flush - 700 x 2200mm-278353-Ground Level _0_45

usually i want to remove the ID and view name to become like this without have to re type because it is tedious

M_Single-Flush - 700 x 2200mm

something like how many letters you want to remove from last to first ?

or something better like remove this last two dash and the letters embedded inside ( that separate name-ID-View name)  -278353-Ground Level _0_45?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Write Unicode Characters To Text File

Jun 27, 2013

I can't write unicode characters to a text file.

as you know, you can write chars on text screen easily: (write-line (strcat "\U+" "2122"))

but if you want to write chars to a text file, this command does not work: (write-line (strcat "\U+" "2122") TxtFileVar)

Here is a part of my code to test:
(defun C:HexGen ( / d f S w x y z h c)(setq d '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F") f (open "c:\0000-FFFF.txt" "w"))(foreach w d (foreach x d (foreach y d (progn (setq S "") (foreach z d (progn (setq h (strcat w x y z)) (setq c (strcat "\U+" h));;;<===character (setq S (strcat S " " (strcat h " = " c ))) ) ) (write-line S f) ) ) )) (close f)(startapp "notepad" "c:\0000-FFFF.txt"))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create A Table With All Characters Inside A Font

Jan 4, 2013

I want to create a table with all characters inside a font.I used "%%" to change a number to it's character.but "%%" limited to 999 and for numbers bigger than 999 it doesn't work.

also, CHR command limited to 255 and for numbers bigger than 255 it change to (number-255). so I used "%%" to create this table:[Please change default font in your AutoCAD to ARIAL]

(Defun c:charmap ()
(setvar "cmdecho" 0)
(setq cnt 1.0)
(setq r_cnt 0.0)
(setq ts 32)
(setq x 0.0)
(setq y 0.0)
[code]...

I want to know:

1- what can I do for numbers more than 999?

2- How can I know the number of characters inside a font?

3-how can improve my LISP program to have complete characters inside the fonts?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Assign Variable Based On The Number Of Characters To Be Removed

Apr 1, 2013

(defun layun (target_obj / original_layer original_layer_info target_obj_atts new_layer )(setqoriginal_layer (cdr (assoc 8 (entget target_obj)))original_layer_info (tblsearch "layer" original_layer)target_obj_atts (entget target_obj));setq(if (or(wcmatch original_layer "*-P123"); REMOVES 4 CHARACTERS(wcmatch original_layer "*-P123456"); REMOVES 7 CHARACTERS(wcmatch original_layer "*-P123456789"); REMOVES 10 CHARACTERS );or(progn(setq new_layer (substr original_layer 1 (- (strlen original_layer) ??))) ; NEED TO ASSIGN VARIABLE TO MATCH THE NUMBER OF CHARACTERS TO REMOVE(if (not (tblsearch "layer" new_layer))(progn(entmake ;;;begin to make new layer(list'(0 . "LAYER")'(100 . "AcDbSymbolTableRecord")'(100 . "AcDbLayerTableRecord")(cons 2 new_layer) ;;; layer name(assoc 6 original_layer_info) ;;;re-use original linetype'(70 . 0) ;;;flags - use default flags(assoc 62 original_layer_info) ;;;re-use original color);list);entmake);progn);if(entmod (subst (cons 8 new_layer) (assoc 8 target_obj_atts) target_obj_atts)));progn);if);defun

assign a character where ? is shown so that it matches with the number of characters to remove based on the 3 lines above (see wcmatch lines).  At present, whatever number I replace that ?? with, it removes that number of characters from the layer that I selected (if it meets that WCMATCH criteria).  Another option which may be more difficult is to be able to have the routine look at the object layer and if it contains -N- or -D- or -NEW- or -DEMO- then to remove all the characters that follow these layer modifiers.  This way I can cleanly add another project modifier behind these modifers. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getstring / Getint Digits / Characters Entry Limit?

Aug 26, 2013

I have been searching all over and have not found a method for limiting the number of digits/characters a user can enter for a getstring or getint prompt.

View 9 Replies View Related

AutoCAD 2013 :: Typing Special Text Characters

Mar 6, 2013

Years ago I was able to type %% and a letter so the diameter symbol appeared.

I have forgottoen all the codes over time

Is there an easier way to get those symbosl inserted in a text string (diameter, degree etc) with 2013?

I'm specifically needing to put a superscript number in a text item (eg cubic meteres...).

Does any table of those codes?

View 3 Replies View Related

AutoCAD Inventor :: Excel Linking / Special Characters?

Aug 30, 2013

As everybody know copy/paste excel file into an inventor drawing is sometimes difficult. As you can see in the printscreen a special character is not converted. I supposed it's because this special character is not in the AIGDT or is in the extended character set wich is not considered in Inventor?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Continuous Dimension Lisp That Alternate Its Position

Jul 12, 2012

Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high?  If there is no lisp already created, how to create one? 

See Continuous dimension attachment for example.

I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add String To Each Item In List Using Lisp

Nov 14, 2013

I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg").  how would i go about doing that using LISP?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Opening Drawings With Default Visual Style Set To 2D Wireframe

Oct 7, 2013

Is there a way to programatically set a visual style before a drawing actually opens?

We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings.  Some models will crash on some workstations when trying to open in a rendered mode.

I found a lisp with a function that looked to set viewport visual styles.  But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write A Lisp Routine That Invoke The Mleader Command

Oct 11, 2012

I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.

attached is what I have written so far:-

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Visual Effect Settings?

Jun 20, 2013

Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.

View 4 Replies View Related

Photoshop :: How Do I Insert Special Characters In PS6?

Aug 15, 2003

how d I insert special charecters "like copyright" into a photoshop 6.

Or for that fact a place to find the list of PC Photoshop keyboard shortcuts. Besides the one thats missing from my book.

View 15 Replies View Related

InDesign :: Some Special Characters Are Displays As Box?

Feb 14, 2014

I've exported the ePub file from InDesign CC and found some special characters are looks as box i.e., as junk. But while unzip the ePub and open the particular XHTML in internet explore, it displays fine.

View 3 Replies View Related

Photoshop :: Special Characters Ignore Formatting?

Aug 2, 2012

I've been wanting to upgrade to CS6 but have one issue that is preventing me from using it exclusively during testing that did not occur in CS5.
 
When typing special characters the formatting jumps all over the place and the speical characters end up at the end of text and not where I typed them. 
 
For instance, if I type ALT+0169 (The copyright symbol ©) then my name, the © ends up at the end of my name.   I have to reopen CS5 to do any speical characters using the ALT key + number combinatiion.  
 
To try it, just type [Space][Space][ALT+0169] then any text.   If your system is doing what mine does, the text jumps around and puts the © at the end of the text not the start. 
 
I've tried to copy and put the character at the end of the text but to no avail.  It seems CS6 only allows the character at the end of the text line.
 
It's the only thing keeping me from upgrading to CS6 which otherwise I really like. 

View 5 Replies View Related

VideoStudio :: Entering Special Characters With Alt-xxx Into Titles?

Apr 28, 2011

It seems that I cannot enter a special character into the text of a title with Alt-0xxx, even though this works with just about all other Windows applications. Is this a feature or a bug? Or is there a way to do this that I'm unaware of?

For the moment I'm entering the special characters into a text editor, then copying and pasting them into the title, which works, but is awkward. I don't understand why VideoStudio doesn't let me enter the characters directly.

The characters in question are things like typographic quotes, some accented characters, bugs like copyright and registered trademark, and other things that are not unusual to need to use in a title.

View 3 Replies View Related

Photoshop :: Accessing Font Special Characters

Feb 17, 2005

I'm experiencing a very bizarre problem in CS with a font special character. I used Extensis Suitcase to examine all the font characters for a particular font that I'm using on a project. The character mapping shows the key combination for the character I want is (on a Mac) Option/Alt + Z.

This works in every other application on my computer, including my email application, but for some reason, within CS it brings up the Omega character. Any idea why this happens and how I change it? I even tried to type the character in Word and cut and paste it into Photoshop and it changes! What gives?

View 8 Replies View Related

Paint.NET :: Insert Symbols And Special Characters (R)(T)(C)

Sep 6, 2005

Its seems important to be able to insert and use special characters in text, as much of the graphics from Paint.net are used on web pages, etc.

When I try to cut & paste text with special chacters it substitutes things like â for ®.

Or did I overlook this feature?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved