Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
sean.keohane
Posts: 172
Registered: ‎02-10-2004
Message 1 of 4 (142 Views)

Adding variable to existing lisp...

142 Views, 3 Replies
10-04-2012 07:05 AM

Hi,

I have attached 2 lisp files. datblkx5 makes a block of selection, inserts the block with a 5x distortion, explodes it, and corrects the text for width factor and text height. This one works fine.

I wanted to add the feature of scaling my selection with a user input value. This is the lisp datblkxxx. This one doesn't work. (that is it doesn't correct the text for width factor). I can't figure it out.

I'd appreciate it if someone could take a look and set me straight.

Regards

Sean

Contributor
anim8er3
Posts: 20
Registered: ‎08-30-2012
Message 2 of 4 (138 Views)

Re: Adding variable to existing lisp...

10-04-2012 07:35 AM in reply to: sean.keohane

Without even looking at the code, I can tell you that the STYLE settings for the text could defeat your efforts. Do you want the text to retain it's original size? Or do you want it to scale up/down?

Distinguished Contributor
sean.keohane
Posts: 172
Registered: ‎02-10-2004
Message 3 of 4 (132 Views)

Re: Adding variable to existing lisp...

10-04-2012 07:51 AM in reply to: anim8er3

Hi,

The Text is sized with the mt1 and mt2 variable. This works OK when the scale factor is set ( to 5 in the datblkx5 lisp).

It all goes wrong when I try to introduce a user input variable for this factor. (for any scale, as in datblkxxx lisp).

I'm not sure I understand your observation though, can you explain it further?

thanks

Sean

Contributor
anim8er3
Posts: 20
Registered: ‎08-30-2012
Message 4 of 4 (121 Views)

Re: Adding variable to existing lisp...

10-04-2012 10:47 AM in reply to: sean.keohane

You are searching for text with a specific width factor, perhaps your text is not exactly that width factor once exploded out of the block. Therefore, it would not be added to the selection set you are changing, so no change occurs. I would check the math or perhaps find another way to add the text to the selection set. Use a different selection set search method.

 

My previous concert was that a text height and width factor are set for a text style. Under some circumstances, your text may revert to those settings despite having been set in the text object as something different. Probably not the issue here.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.