Jump to content

Text concatenate LISP editing


romparkin

Recommended Posts

Ok I have programmed  Intellicad before and sometimes a tiny change in the code syntax is required.

 

I found this 2009 can you confirm VL is supported

IntelliCAD doesn't have any AutoLISP editor or debugger. However, as long as your code doesn't have any of the Visual LISP functions (vl-, vla- or vlax-), it should work in IntelliCAD.

 

Try this pick an object should see properties, else may give an error if so post message.

 

;;;===================================================================; 
;;; DumpIt                                                            ; 
;;;-------------------------------------------------------------------; 
;;; Dump all methods and properties for selected objects              ; 
;;;===================================================================; 
(defun C:Dumpit ( / ent) 
  (while (setq ent (entsel)) 
    (vlax-Dump-Object 
      (vlax-Ename->Vla-Object (car ent)) 
    ) 
  ) 
  (princ) 
)

 

Edited by BIGAL
Link to comment
Share on other sites

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

  • romparkin

    14

  • BIGAL

    13

  • Steven P

    2

  • exceed

    2

Top Posters In This Topic

Posted Images

Ok a further test really need to know that VL-lisp is supported so copy this line to command line and pick a object.

 

(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))

 

eg pick a line

#<VLA-OBJECT IAcadLine 000001e15b3001a8>

 

Tested again with code from here in case something got lost in paste to forum.
 

 

Edited by BIGAL
Link to comment
Share on other sites

7 hours ago, BIGAL said:

Ok a further test really need to know that VL-lisp is supported so copy this line to command line and pick a object.

 

(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))

 

eg pick a line

#<VLA-OBJECT IAcadLine 000001e15b3001a8>

 

Tested again with code from here in case something got lost in paste to forum.
 

 

Hi BIGAL

 

I run the command, it prompts to pick an object, I select the line, and returns nothing

After that if I press Enter to run last command, it runs the Line command that was used before to draw some lines for the test

 

Command: (setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))
Pick obj
Command: 
_LINE

 

 

So must be Intellicad issue

 

Link to comment
Share on other sites

It is sounding very much like VL lisp is not supported, problem is VL lisp has so many functions that people use. 

 

You need to contact your supplier and ask the question is Visual Lisp supported, I tried googling and could not find a clear answer for Intellicad.

 

As a last minute test

(vl-load-com)

then

(setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))

Edited by BIGAL
Link to comment
Share on other sites

HI BIGAL

 

Command: (vl-load-com)

Command: (setq obj (vlax-ename->vla-object (car  (entsel "Pick obj"))))
Pick obj
#<VLA-OBJECT: 393bc750>

 

Now as you see after pick object I get this in command line

 

Thanks

Romeo

Link to comment
Share on other sites

My code has the (vl-loa-com) so thats ok, now the hard part we need to find where the code is failing.

 

ok 1st check add this line program will bomb out if no selection set.

 

(setq lst '())

(if (= ss nil)(progn (alert "selection set not working")(exit))) ; new line

(repeat (setq x (sslength ss))

 

 

Link to comment
Share on other sites

On 3/1/2022 at 4:02 AM, BIGAL said:

My code has the (vl-loa-com) so thats ok, now the hard part we need to find where the code is failing.

 

ok 1st check add this line program will bomb out if no selection set.

 

(setq lst '())

(if (= ss nil)(progn (alert "selection set not working")(exit))) ; new line

(repeat (setq x (sslength ss))

 

 

HI BIGAL

 

I don't know where to add the last codes, but to save your time, I think we should leave it.

Obviously  Intellicad is not working with all the AutoCAD Auto lisp , Visual lisp commands, and try to debug this it's a pain.

 

I'm happy with the text merge lisp we managed to make,  and copy paste this to Excel/Calc speeds up my process.

 

Thanks a lot for your time and efforts

 

Regards

Romeo

Link to comment
Share on other sites

6 hours ago, BIGAL said:

Post your test dwg if its different than the one you posted earlier.

 

Hi BIGAL

the test file is the same as the last one I have sent you

 

Thanks

Romeo

Link to comment
Share on other sites

Ok sounds like your not understanding what it is asking for re your sample dwg. 

 

The code looks for blocks named beton if these dont exist it will not work.

 

So pick a point for the table 1 click

When asked select all the dwg all the blocks and the pline using say a window select multi goes is ok

Zoom in and pick the pline make sure get pline needs a multi zoom in using mouse

Enter the chainage

 

A table should appear.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...