Jump to content
nod684

insert a field using LISP

Recommended Posts

nod684

hi all, can someone help me make this process shorter...

 

 

 

what i do is like this:

 

 

- select an attributed block

 

- insert a field

 

- in the Field Names i select object then i choose another attributed block for the value or viewport for the custom scale i need

 

- in the Object Type Property I select value or custom scale

 

- in the format I select uppercase or 1: # (if i select custom scale) then click ok.

Edited by nod684

Share this post


Link to post
Share on other sites
Lee Mac

You could create a program using my Quick Field utility to perform this task.

Share this post


Link to post
Share on other sites
nod684
You could create a program using my Quick Field utility to perform this task.

 

hi lee, can you help me with the format for the value?

im trying to incorporate it in your QuickField lsp...

 

(see attached)

field.png

Share this post


Link to post
Share on other sites
Lee Mac
hi lee, can you help me with the format for the value?

im trying to incorporate it in your QuickField lsp...

 

For the property & formatting code shown in your image, you would need to use:

(defun c:test ( ) (LM:QuickField "TextString" "%tc1" 1))

However, since the program doesn't allow you to select nested objects (such as attributes) by default, you will also need to change line 248 from:

(list 'if '(setq ent (LM:SelectIfHasProp prop entsel))

to:

(list 'if '(setq ent (LM:SelectIfHasProp prop [color=red]n[/color]entsel))

Share this post


Link to post
Share on other sites
nod684
For the property & formatting code shown in your image, you would need to use:

(defun c:test ( ) (LM:QuickField "TextString" "%tc1" 1))

However, since the program doesn't allow you to select nested objects (such as attributes) by default, you will also need to change line 248 from:

(list 'if '(setq ent (LM:SelectIfHasProp prop entsel))

to:

(list 'if '(setq ent (LM:SelectIfHasProp prop [color=red]n[/color]entsel))

 

thanks Lee, will try this one out

 

EDIT :

was able to select the nested attribute to the target attribute but its displaying as ####

Share this post


Link to post
Share on other sites
Lee Mac
thanks Lee, will try this one out

 

EDIT :

was able to select the nested attribute to the target attribute but its displaying as ####

 

Does a regen cause it to display correctly?

Share this post


Link to post
Share on other sites
nod684
Does a regen cause it to display correctly?

 

 

 

yes it did. Thank you.!

 

one more thing if its not too much to ask.

what format will i use if i want to insert the scale of the viewport thru field?

Scale.jpg

Edited by nod684

Share this post


Link to post
Share on other sites
Lee Mac
yes it did. Thank you.!

 

You're welcome!

 

one more thing if its not too much to ask.

what format will i use if i want to insert the scale of the viewport thru field?

 

I'm happy to guide you, but could you please post a clearer image of the Field dialog, as the image that you have attached is too pixelated to decipher the field code - ensure the image is saved as a vector format such as png/gif and is not larger than 800x600 otherwise the forum will automatically convert the image to a jpg and scale it down.

Share this post


Link to post
Share on other sites
nod684
You're welcome!

 

 

 

I'm happy to guide you, but could you please post a clearer image of the Field dialog, as the image that you have attached is too pixelated to decipher the field code - ensure the image is saved as a vector format such as png/gif and is not larger than 800x600 otherwise the forum will automatically convert the image to a jpg and scale it down.

ScreenShot001.png

 

sorry about that...here is a bigger image

 

and heres the field expression





%<\AcObjProp Object(%<\_ObjId 8796086054176>%).CustomScale \f 
"1:%lu2%ct1%qf2816">%

Share this post


Link to post
Share on other sites
Lee Mac

Thank you - in that case you could define a program with the following parameters:

(defun c:test ( ) (LM:QuickField "CustomScale" "1:%lu2%ct1%qf2816" 1))

Do you see the pattern and understand how the sections are taken from the field code?

Share this post


Link to post
Share on other sites
nod684
Thank you - in that case you could define a program with the following parameters:

(defun c:test ( ) (LM:QuickField "CustomScale" "1:%lu2%ct1%qf2816" 1))

Do you see the pattern and understand how the sections are taken from the field code?

 

thanks a lot for the help Lee. I appreciate it a lot.

yes my mistake...i fo like this :

(defun c:test ( ) (LM:QuickField "Scale" "CustomScale" "1:%lu2%ct1%qf2816" 1))

again thank you! :)

and thanks too to pBe fo the vla-regen

cheers guys!

Share this post


Link to post
Share on other sites
catopal

Hi Lee,

 

How can I get dynamic block user parameter value with QuickField lisp. ?

 

%<\AcObjProp Object(%<\_ObjId 140694963280112>%).Parameter(96).UpdatedDistance \f "%lu2%pr0">%

Share this post


Link to post
Share on other sites
Lee Mac
Hi Lee,

 

How can I get dynamic block user parameter value with QuickField lisp. ?

 

%<\AcObjProp Object(%<\_ObjId 140694963280112>%).Parameter(96).UpdatedDistance \f "%lu2%pr0">%

 

This is unfortunately not possible using my Quick Field program.

Share this post


Link to post
Share on other sites
vtb_bmstu

Hi everyone!

Could someone write a LISP for copying text contents from text 1 to text 2, and when the contents of text 1 change, then the contents of text 2 will automatically update contents from text 1! Thank you

Share this post


Link to post
Share on other sites
Lee Mac
Posted (edited)
10 hours ago, vtb_bmstu said:

Could someone write a LISP for copying text contents from text 1 to text 2, and when the contents of text 1 change, then the contents of text 2 will automatically update contents from text 1! Thank you

 

You can use my existing Quick Field program for this task, defining a custom command such as:

(defun c:tcopy ( ) (LM:quickfield "Textstring" "" 1))

quickfieldtcopy.gif.ee499a6faabb995d2b37c9ba5c95f8cb.gif

Edited by Lee Mac
  • Like 1

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...