Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. (defun c:setbyblock ( / _byblock e n x a sel c) (defun _byblock ( n l / a e x ) (if (and (setq e (tblobjname "BLOCK" n)) (not (member n l))) (while (setq e (entnext e)) (setq x (entget e)) (if (setq a (assoc 420 x)) (setq x (vl-remove (assoc 420 x) x)) ) (if (setq a (assoc 62 x)) (entmod (subst '(62 . 0) a x)) (entmod (append x '((62 . 0)))) ) (if (= "INSERT" (cdr (assoc 0 x))) (_byblock (cdr (assoc 2 x)) (cons n l)) ) ) ) nil ) (prompt "\nSelect Blocks: ") (setq sel (ssget (list (cons 0 "INSERT")))) (setq c 0) (repeat (sslength sel) (setq n (ssname sel c)) (_byblock (cdr (assoc 2 (entget n))) nil) (setq c (1+ c)) ) (command "_.regen") (princ) ) Merry Christmas and best wishes to all, I would kindly need you to change this code so that it also makes the byblock transparency in addition to the color of the blocks
  3. Today
  4. Saxlle

    Happy New Year 2026

    Thank you @BIGAL. How not resist to BBQ . Cheers
  5. Danielm103

    Python with CMS IntelliCAD 14.1

    Back in the old days, it was SDS and vanilla lisp lol. There’s a blog here that mentions support for FAS/VLX https://www.intellicad.org/articles-and-press-releases/2025-recap-intellicad-14-developer-tools-and-ecosystem-momentum One of the contributors to the Python project made a super cool test suite, so I have some coverage with IcARX(ARC). I don’t have a unit test for lisp except for resbuf wrapper that I pass to the lisp engine, those pass. It will be interesting to see how they progress.
  6. BIGAL

    Python with CMS IntelliCAD 14.1

    I post the 3d house image often and a version of that software was available for Intellicad back in the 90's, there was no VL lisp in those days. It was very good then and seen as a competitor to LT,
  7. Danielm103

    Python with CMS IntelliCAD 14.1

    I was able to connect with ITC Directly and report the items I felt are important from an API perspective. AcRxClass::dxfName() is null with AcDbObject AcDbObject::close() has an access violation if called twice. I think the next release or so of IntelliCAD will be a real competitor in the space. Assuming pricing is stable, there’s no reason to buy any ‘lite’ version of CAD
  8. Danielm103

    Python with CMS IntelliCAD 14.1

    But there’s stuff missing, from the automated tests in PyRx "collecting ... collected 529 items / 210 deselected / 3 skipped / 319 selected" There are 210 tests that I had to disable to get a clean run. I’m still working through them, I disabled the whole class on some tests all the test_Ax**** tests are not accurate, I've not worked through them yet Filename NextLine -------- -------- test_Ax3DFace.py class TestAx3dFace: test_Ax3DPolyline.py class TestAx3DPolyline: test_Ax3DSolid.py class TestAx3DSolid: test_AxAcadSortentsTable.py class TestAcadSortentsTable: test_AxAcadSortentsTable.py test_AxApplication.py class TestAxApplication: test_AxArc.py class TestAxArc: test_AxAttribute.py class TestAxAttribute: test_AxBlock.py class TestAxBlock: test_AxBlockReference.py class TestAxBlockReference: test_AxBlockReference.py class TestAxDynBlockReference: test_AxCircle.py class TestAxCircle: test_AxDatabase.py class TestAxDatabase: test_AxDocument.py class TestAxDocument: test_AxEllipse.py class TestAxEllipse: test_AxEntity.py class TestAxEntity: test_AxGroup.py fail test_AxLayout.py class TestAxLayout: test_AxLWPolyline.py def test_getcoordinate(self): test_AxLWPolyline.py test_AxMenu.py class TestAxMenu: test_AxModelSpace.py class TestAxModelSpace: test_AxObject.py class TestAxObject: test_AxPoint.py class TestAxPoint: test_AxPolygonMesh.py class TestAxPolygonMesh : test_AxPolyline.py class TestAxPolyline: test_AxPreferences.py class TestAxPreferences: test_AxPreferences.py class TestSelection: test_AxPreferences.py class TestDrafting: test_AxPreferences.py class TestDisplay: test_AxPreferences.py class TestPrefFiles: test_AxSummaryInfo.py class TestAxSummaryInfo: test_AxTable.py class TestAxTable: test_AxUtility.py class TestAxUtility: test_Brep.py class TestBrep: test_AssocPersSubentIdPE.py test_AttributeDefinition.py (mtext attributes) test_AttributeDefinition.py test_Database.py def test_dbopbject_dxfname(self, db_06457: Db.Database): test_Database.py def test_getSummaryInfo(self): test_Database.py def test_blocktable(self, db_06457: Db.Database): test_Database.py def test_GeoPositionMarker(self, db_geo: Db.Database): test_Database.py def test_GeoData(self, db_geo: Db.Database) -> None: test_Database.py def test_GeoData_transformFromLonLatAlt(self, db_geo: Db.Database) -> None: test_Database.py def test_tdusrtimer(self) -> None: test_DbObject.py def test_property_ids2(self): test_DbObject.py def test_undo_recording(self): test_DbObject.py def test_BinaryData(self): test_DbObject.py def test_BinaryXdData(self): test_entity.py def test_dbtext(self): test_entity.py def test_dbleader(self): test_entity.py def test_table_cells1(self, db_06457: Db.Database): //missing iterator test_entity.py def test_table_cells2(self, db_06457: Db.Database): //missing iterator test_entity.py def test_table_cellValues1(self, db_06457: Db.Database): //missing iterator test_entity.py def test_table_cellValues2(self, db_06457: Db.Database): //missing iterator test_entity.py def test_table_cellValues4(self, db_06457: Db.Database): //missing iterator test_entity.py def test_table_calcTextExtents(self): test_entity.py def test_create_wipout(self): test_entity.py def test_create_extruded_surface(self): test_SortentsTable.py def test_getinstance(self): test_XrefGraph.py def test_XrefGraph(self, db_xrefGraph: Db.Database): test_Editor.py def test_evaluateDiesel(self): test_Curve2d.py def test_ge2dcurve_length(self): test_Curve3d.py def test_Ge_lineseg3d_1(self): test_Curve3d.py def test_ge3dcurve_length(self): test_GsCore.py def test_gs_getBlockImage(self, db_dynblock: Db.Database): test_RxObject.py def test_name(self): test_SheetSet.py class TestSheetSet: test_wx.py def test_wx_CallAfter(self): test_block_reference.py def test_get_attribute(self, db_06457: Db.Database): test_prompt.py def test_select_entity_without_type(self): test_prompt.py def test_select_entity_with_single_type(self): test_prompt.py def test_select_entity_with_multiple_types(self): test_reload.py class Test_Reload: test_reload.py class Test_reload_func:
  9. Danielm103

    Python with CMS IntelliCAD 14.1

    Thanks! I’m always rooting for the underdog, I guess to promote competition in the space. I’ve been goofing around with the clones since the early days. I think before version 9. Every year, I download the trial and try out the IARX SDK. The trial is 14 days, this is the first time I was able to get past day 1 and run some real tests. Here’s my little mini review of the API. - I was able to compile my custom object https://github.com/CEXT-Dan/ArxTin While I didn’t test all the protocols, the important ones work great! dwgOutFields, dwgInFields, subWorldDraw, subTransformBy etc. The most impressive thing besides it working, is the subWorldDraw performance. In this sample, I’m pushing 10s of thousands of edges to the graphics interface and transformby is as fast a moving a line. A $250 cad is out performing a $1200 cad by 10x
  10. Yesterday
  11. mhupp

    ZWCad Debug

    My 0.02¢ sprinkle some code in updates a variable through out the code. and recall it with error trapping This will show Error# 4 : bad argument type <(40)> ; expected <NUMBER> at [DXF/XED data] this error message would tell you to look after (setq x "4") for the error. (defun c:CIR (/ cen rad) (defun *error* (msg) (if (not (member msg '( "Function cancelled" "quit / exit abort"))) (princ (strcat "\nError# " x " : " msg)) ) (princ) ) (setq x "1") (setq cen (getpoint "\nSpecify center point: ")) (setq x "2") (if cen (progn (setq x "3") (setq rad (getdist cen "\nSpecify radius: ")) (setq x "4") (if rad (entmake (list '(0 . "CIRCLE") '(100 . "AcDbEntity") '(100 . "AcDbCircle") (cons 10 cen) (cons 40 ra))) ) (setq x "5") ) ) (setq x "6") (princ) ) -edit guess this is more steps then what Steven P posted. Also remember someone saying that zwcad can't use some vl commands.
  12. BIGAL

    ZWCad Debug

    Like Steven P often use an Alert so it stops and can see where it got to. I tend to test code as I make it so I don't write all the code then test, If using defuns in main code test them by using Setq to set the value of the variables used in the defun and I use copy code and paste to command line to run a few lines at a time. The obvious problem I use Notepad++, is check for open and close bracket matching as I create code. I think it was ZWCAD that wrote VBA code when using macro record am I correct ?
  13. BIGAL

    Happy New Year 2026

    Very clever, that would have taken a while to do. Happy new year, will put a shrimp prawn on the BBQ for you new years day.
  14. Troller

    ZWCad Debug

    Thanks Steven P
  15. Steven P

    ZWCad Debug

    Not sure for ZWCad, but if you put checks into the code this can narrow down to where there error is. For example (princ "\nOK to here 1")... and 2, 3, 4 etc will show where the code runs to before an error (often errors are grammatically correct and just not doing what you want). Might help you out till you get another answer
  16. Troller

    ZWCad Debug

    Thanks SLW210! I use ZWCad 2026
  17. SLW210

    Happy New Year 2026

    Happy New Year!!
  18. SLW210

    ZWCad Debug

    I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. You may need the ZWCAD plug-in for VS Code. https://marketplace.visualstudio.com/items?itemName=Zwsoft.ZwLisp What version of ZWCAD do you use?
  19. Saxlle

    Happy New Year 2026

    Hvala lepo @marko_ribar, takodje, sve najbolje u novoj godini!
  20. marko_ribar

    Happy New Year 2026

    Odlicno... Srecna Nova 2026... Pozdrav svima i neka nam svima bude dobra i bericetna... Puno veselja, srece i dobrog zdravlja u novoj godini...
  21. CyberAngel

    Python with CMS IntelliCAD 14.1

    Some really cool stuff here
  22. Troller

    ZWCad Debug

    I'm having trouble debugging AutoLISP code in ZWCad. In AutoCAD, I can use the VLIDE editor or set the LISPDEBUG variable to trace errors and see where they occur, but ZWCad doesn't seem to support LISPDEBUG (it says the variable doesn't exist). When I type "VLIDE" in the ZWCad command line, it just opens VS Code for editing the .lsp file, which doesn't help with runtime debugging. Are there any built-in tools or methods in ZWCad for debugging Lisp scripts? For example, how can I get line numbers for errors, trace function calls, or step through code? I've tried loading the file and running it, but the error messages in the command line don't specify the exact location. Any recommendations for external tools or workarounds would be appreciated. Thanks!
  23. Does not sound familiar. The only other civil project I am aware of is the Capistrano property. What have you accomplished so far? Can you attach a copy of the project instructions to your next post? Do NOT attach a drawing.
  24. Greetings to all members of Cad Tutor, Based on the upcoming holidays and New Year, I'v made something interesting which I want it to share with you. Everything was made using a Lisp. I hope it will interesting to all of you and maybe give some inspiration to the next year to made something different and share it with rest of us . Notice (it is on cyrillic, in Serbian language): - ЗИМСКА СЛУЖБА = Winter service on roads; - СРЕЋНА НОВА ГОДИНА = HAPPY NEW YEAR; - XO-XO-XOO = HO-HO-HOO (). Happy New Year 2026 to all members, and wish you all the best and new codes . NovaGodina2026_CadTutor.mp4 Best regards, Saxlle.
  25. Wondering if you did the Stines residential drawing yet if can you help me please this book isn’t any help
  26. Danielm103

    Python with CMS IntelliCAD 14.1

    test with wxPython
  27. Danielm103

    Python with CMS IntelliCAD 14.1

    Here’s a test extracting data from multiple drawings import traceback import pandas as pd import os from pyrx import Ap, Db, Ed, Ge def proccessDrawing(db: Db.Database, data: dict): blk_dict = db.getBlocks() fname = os.path.basename(db.getFilename()) data[fname] = [] for name, id in blk_dict.items(): if name != "RMNUM": continue btr = Db.BlockTableRecord(id) for refid in btr.getBlockReferenceIds(): blkref = Db.BlockReference(refid) for attid in blkref.attributeIds(): attref = Db.AttributeReference(attid) data[fname].append(attref.textString()) def openSideDatabase(dwg_path: str, data: dict): sdb = Db.Database(False, True) sdb.readDwgFile(dwg_path) sdb.closeInput(True) proccessDrawing(sdb, data) @Ap.Command() def doit(): try: data = {} dwgs = Ap.Application.listFilesInPath("E:\\FloorPlans", ".dwg") for dwg in dwgs: openSideDatabase(dwg, data) df = pd.DataFrame(data) print(df) except Exception as err: traceback.print_exception(err) output : Success module _DOIT is loaded: Command: doit 1st floor.dwg 2nd floor.dwg 3rd floor.dwg 0 1049 2049 3049 1 1045 2045 3045 2 1032 2032 3032 3 1048 2048 3048 4 1046 2046 3046 .. ... ... ... 94 1122 2122 3122 95 1106 2106 3106 96 1104 2104 3104 97 1093 2093 3093 98 1042 2042 3042 [99 rows x 3 columns]
  28. Super cool to see the progress IntelliCAD has made with their C++ API. I’ve been working to port pyrx, still not released, there’s a couple small issues I need to work out import traceback from pyrx import Ap, Db, Ge # ----------------------------- # Simple spline-based vector font # ----------------------------- FONT = { "H": [[(0, 0), (0, 10)], [(5, 0), (5, 10)], [(0, 5), (5, 5)]], "A": [[(0, 0), (2.5, 10), (5, 0)], [(1.2, 5), (3.8, 5)]], "P": [[(0, 0), (0, 10)], [(0, 10), (5, 9), (5, 6), (0, 5)]], "Y": [[(0, 10), (2.5, 5)], [(5, 10), (2.5, 5)], [(2.5, 5), (2.5, 0)]], "N": [[(0, 0), (0, 10)], [(0, 10), (5, 0)], [(5, 0), (5, 10)]], "E": [[(5, 0), (0, 0), (0, 10), (5, 10)], [(0, 5), (4, 5)]], "W": [[(0, 10), (1.2, 0), (2.5, 6), (3.8, 0), (5, 10)]], "R": [[(0, 0), (0, 10)], [(0, 10), (5, 9), (5, 6), (0, 5)], [(0, 5), (5, 0)]], " ": [], } # ----------------------------- # Create a spline from points # ----------------------------- def add_spline(ms, pts, base, scale): arr = [] for p in pts: arr.append(Ge.Point3d(base.x + p[0] * scale, base.y + p[1] * scale, 0.0)) spline = Db.Spline(arr, 3, 0.0) ms.appendAcDbEntity(spline) # ----------------------------- # Write text as splines # ----------------------------- def write_happy_new_year(start=Ge.Point3d(0, 0, 0), scale=5.0, spacing=8.0): db = Db.curDb() ms = Db.BlockTableRecord(db.modelSpaceId(), Db.OpenMode.kForWrite) cursor = Ge.Point3d(start.x, start.y, 0) text = "HAPPY NEW YEAR" for ch in text: strokes = FONT.get(ch.upper(), []) for stroke in strokes: add_spline(ms, stroke, cursor, scale) cursor.x += spacing * scale # ----------------------------- # Entry point # ----------------------------- def PyRxCmd_HAPPYNEWYEAR(): try: write_happy_new_year(start=Ge.Point3d(0, 0, 0), scale=2.5, spacing=7.0) except Exception as err: traceback.print_exception(err)
  1. Load more activity
×
×
  • Create New...