Author Topic: DimStyleTableRecords  (Read 9535 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: DimStyleTableRecords
« Reply #15 on: November 10, 2007, 07:10:27 PM »
..................... Unfortunately, I must set the cloned DIMSTYLE active as this is kicked off from a CommandWillStart event and if a dimensioning command, I need to set a particular style current.

not really off topic.

Are the styles defined with Dimscale 1
then is the Active Dimscale ( say 10 )used as an override ?

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #16 on: November 10, 2007, 07:11:08 PM »

Not doing a copy from ..

simply

Restore a style
Setvars for the changes I want to make ( which creates overrides)
Save the Style with the new name.

I'm wondering if saving the Style after CopyFrom is required.

Are the overrides different to the copied Style ?


What lisp functions are you using to restore and save Kerry?
Not sure what you mean by overrides different to the copied style...there are no overrides in my source dimstyle, only in the current dimstyle in the current drawing...those are being attached to the new cloned entry...

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #17 on: November 10, 2007, 07:13:12 PM »
Are the styles defined with Dimscale 1
then is the Active Dimscale ( say 10 )used as an override ?

That's the intent when this is finished, spot on. The dimscale override will be used/kicked off from the user before this cloning takes process...at least that's what I'm thinking at this point.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: DimStyleTableRecords
« Reply #18 on: November 10, 2007, 07:28:42 PM »
Are the styles defined with Dimscale 1
then is the Active Dimscale ( say 10 )used as an override ?

That's the intent when this is finished, spot on. The dimscale override will be used/kicked off from the user before this cloning takes process...at least that's what I'm thinking at this point.

Thats sort of what we do.
Styles defined at configuration.

Then do this sort of thing ..

Code: [Select]
(DEFUN cta17:restoredimstyle (ds / tmp)
  (IF (VL-POSITION ds (ai_table "DIMSTYLE" 0))
(PROGN (SETQ tmp (GETVAR "dimscale"))
   (VL-CMDF "._DIM1" "RESTORE" ds)
   (SETVAR "dimscale" tmp)
   (PROMPT (STRCAT "\nDimstyle " ds " Restored"))
)
(PROMPT
  (STRCAT "\nUNABLE to Dimstyle Restored Dimstyle " ds)
)
  )
  (PRINC)
)

(DEFUN c:stda35 () (cta17:restoredimstyle "stda35") (PRINC))
(DEFUN c:std35 () (cta17:restoredimstyle "std35") (PRINC))
(DEFUN c:dimr30 () (cta17:restoredimstyle "STDRUNNER30") (PRINC))
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #19 on: November 10, 2007, 07:41:14 PM »
That's what I sort of thought you were doing Kerry...thanks for that. I'm still no closer to solving, however i'm starting to develop some thoughts on a couple of different attacks.

Cheers,
Glenn.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: DimStyleTableRecords
« Reply #20 on: November 10, 2007, 08:04:40 PM »

Glenn, I don't think it's an issue.
The Overrides showing are the differences between the current and the highlighted. ( I think)

As soon as the 1-1 style is made current the overrides show on the other styles ..
.. appears to not affect the style as drawn.


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #21 on: November 10, 2007, 08:16:12 PM »
Kerry,

Here is some updated code to set the cloned dimstyle active.

Now, once you've built that dll and tossed the drawing I attached previously into the same folder as the dll, load AutoCAD and start a new drawing. Once in, goto the Dim Style manager and verify that the active Dim Style has no overrides on it. Now, at the command line, type in DIMSCALE and change it to something other than it's current value for the current style - this should now give you style overrides on the current style in Dim Style Manager.

Now, NETLOAD the dll and run the command 'Dolly'. If this completes successfully, you should now see in the dimension toolbar that the '1-1' style has been cloned in and is active. Now fire up the Dim Style Manager and you should see that the overrides that were on your previously current style are now on the new cloned entry...not desirable.

Can you verify please?

Cheers,
Glenn.
« Last Edit: November 11, 2007, 08:09:41 AM by Glenn R »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: DimStyleTableRecords
« Reply #22 on: November 10, 2007, 08:40:13 PM »
ahhh, I see what you mean.
looks like the style is not being correctly set current
added: even though the style IS shown current in the ToolbarCombo and in the DimStyleManager.

after the netload, If you go into the DimStyleManager and manually set the style current it seems to work as expected

similarly ; dim1 restore 1-1 does the same thing correctly.

That seems like a wobbly .. like for me to report it ?
« Last Edit: November 10, 2007, 09:04:34 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #23 on: November 10, 2007, 08:47:32 PM »
ahhh, I see what you mean.
looks like the style is not being correctly set current

after the netload, If you go into the DimStyleManager and manually set the style current it seems to work

similarly ; dim1 restore 1-1 does the same thing correctly.


Yeah I knew that would do it, but sending command strings during a reaction is a big no-no - thanks for confirming it.

That seems like a wobbly .. like for me to report it ?

Possibly Kerry, but have a look on ADN first if you can, for anything about working with DimStyles etc...we might be missing something blatantly obvious.

I was able to get around it by doing this. Not elegant by any stretch of the imagination, but maybe it's the only way.

Repeat the above steps and you should now end up with 1-1 with style overrides and the only override listed in the Dim Style Manager should be just the DIMSCALE value you set as an override on the previously current style.

Let me know how you go please Kerry.

Cheers,
Glenn.
« Last Edit: November 11, 2007, 08:13:26 AM by Glenn R »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: DimStyleTableRecords
« Reply #24 on: November 10, 2007, 08:49:44 PM »
I had a look on ADN last night .. nothing obvious.

I'll go for a walk and have another look when I get back. ... and have a look at V3

added:
and Lorraine just put a batch of rock cakes in the oven .. I may have to go and supervise :lol:
« Last Edit: November 10, 2007, 08:59:16 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #25 on: November 10, 2007, 09:08:50 PM »
Have one for me!

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #26 on: November 11, 2007, 01:32:07 AM »
Heh...search long enough and you find it:

Code: [Select]
Database.SetDimstyleData(DimStyleTableRecord style)

Cheers,
Glenn.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: DimStyleTableRecords
« Reply #27 on: November 11, 2007, 01:43:32 AM »
Well done !

This has a lot of potential Glenn .. thanks for sharing.



"There is nothing like looking, if you are trying to find something..." ~B.Baggins
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Glenn R

  • Guest
Re: DimStyleTableRecords
« Reply #28 on: November 11, 2007, 01:48:09 AM »
Thanks Kerry - hope it's of some help in future.

Cheers,
Glenn.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: DimStyleTableRecords
« Reply #29 on: November 12, 2007, 11:46:21 AM »
Glad you found what you were looking for Glenn.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.