Recent Posts

Pages: [1] 2 3 ... 10
1
AutoLISP (Vanilla / Visual) / null string in list
« Last post by csgoh on Today at 06:20:57 am »
I have say a list ("" "" "" "" "").
How to check if all the items in a list is null string.
thank you.

2
Ok, Thanks guys.  I abandoned. :oops:
3
.NET / Re: How to convert autocad object to binary string?
« Last post by Alien on Today at 05:45:29 am »
Hmmm...pretty general statement but once you get the object, assuming you just want to convert the name, you could do it like this:

http://stackoverflow.com/questions/5664345/string-to-binary-in-c-sharp
4
AutoLISP (Vanilla / Visual) / Re: problem with plot
« Last post by haibinpro on Today at 05:16:18 am »
after use command audit at the file "print is ok.dwg".It fix all the error,and then use command recover will find none error tobe fix.

thanks roy_043
I known you show me the reason why the dwg files plot in a strange way.
I'll try fix the error and use the plot script at a higher version of autocad to see if the problem canbe solve and report it here.

if anyone known the other way how to plot the two files with normal behaviour.Pls let me known. thanks.
5
I said that is not possible.
OP's describe is very clearly.  if this is  possible, Lee , roy ,ron  has given the answer.
6
AutoLISP (Vanilla / Visual) / Re: problem with plot
« Last post by roy_043 on Today at 04:38:09 am »
I use BricsCAD.
After running the AUDIT command to fix the problem, the -PLOT command shows the normal prompts for the "Model" tab. Of course your code will fail as it can only work for PS layouts.
If AutoCAD cannot fix this with AUDIT you can perhaps try the RECOVER command.
Code: [Select]
: AUDIT
Fix any errors detected? Yes/<No>: y

Name: AcDbLayout(22)
Value: Layout has invalid ModelType flag
Validation: Invalid
Replaced by: Set to True

134 objects audited
Total errors found during audit 1, fixed 1
: -PLOT
Detailed plot configuration? Yes/<No>/Extended: y
Enter a layout name or [?] <Model>:
Enter an output device name or [?] <default.pc3>:
Enter paper size or [?] <Letter 8 1/2 x 11 in>:
Enter paper units Inches/<Millimeters>:
Enter drawing orientation Portrait/<Landscape>:
Plot upside down? Yes/<No>:
Enter plot area <Display>/Extents/Limits/View/Window:
Enter plot scale (Plotted millimeters = Drawing Units) or Fit <1:1>:
Enter plot offset (x,y) or Center <0,0>:
Plot with plot styles? Yes/<No>:
Enter plot style table name or [?] (enter . for none) <>:
Plot with lineweights? Yes/<No>:
Remove hidden lines? Yes/<No>:
Write the plot to a file? Yes/<No>: n
Save changes to layout? Yes/<No>: n
Proceed with plot? <Yes>/No: n
7
You can tell what the results,continue  until  to do?

To speak clearly and easily understand

Can use Dxf or vla to solve?Not very understanding。
8
andy_lee Try!

Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt()
  2.  (setq org (getvar "UCSORG"))
  3.  (vl-cmdf "_.UCS" "_F")
  4.  (while (null (equal 0 (distance (getvar "UCSORG" ) org) 1e-6))(vl-cmdf ""))
  5. )

Hi mianbaoche
The trouble is still exist .  Can use Dxf or vla to solve?
9
AutoLISP (Vanilla / Visual) / Re: Coordinates compertion
« Last post by roy_043 on Today at 04:21:26 am »
@ Shay:
I have a hard time picturing your problem (design of retaining walls?). But that is not very important. The fact is that you are the programmer who is creating this list structure. It is not thrown at you by the CAD program. You should use a structure that works best for you and whatever algorithm you are planning. It is unlikely that there is only a single option. Maybe you don't see the alternative solutions now but when you look back on the finished program after a couple of years you no doubt will.

One thing I would do is pre-sort the point lists before creating the lst list.

Perhaps it can also make sense to work with 3 variables: ptLstFront, ptLstBack and ptLstExist.

Or perhaps the list structure below can work. As you have learnt from the contributions in this topic, it makes sorting the list much easier.
Code: [Select]
(setq lst
  '(
    ("front" (0 3 4))
    ("front" (0 4 0))
    ("front" (0 2 0))
    ("back"  (0 1 3))
    ("back"  (0 5 0))
    ("back"  (0 3 0))
    ("exist" (3 2 0))
    ("exist" (0 4 0))
    ("exist" (9 3 0))
  )
)
10
AutoLISP (Vanilla / Visual) / Re: problem with plot
« Last post by haibinpro on Today at 02:42:40 am »
yes,audit can find some err and fix it.
but the plot behaviour is the same before and after(use audit command)
Pages: [1] 2 3 ... 10