Author Topic: C# & C3D  (Read 13732 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #15 on: December 07, 2006, 06:17:58 PM »
Quote
filtered selection set

Tony's routine actually does a direct test for type in a generic manner.
You could use a filtered selection set .. see the Prompt.cs file in the SDK I mentioned to Luis for examples.

You'd need to know the 'type' either way though ..
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.

LE

  • Guest
Re: C# & C3D
« Reply #16 on: December 07, 2006, 06:19:52 PM »
OK you want responses no.... he he...

Here:
http://www.theswamp.org/index.php?topic=13836.msg166838#msg166838

I did a selection set with filters.....

 :lol:

MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: C# & C3D
« Reply #17 on: December 07, 2006, 06:21:16 PM »
....
Mick, that's what Luis is doing with Text, right? Now I just need to know the proper name &/or reference I'm missing to cast as a FeatureLine.

Yep, basically something like -

MyAeccType typeObj = tr.GetObject(res.ObjectId, OpenMode.ForRead, false) as MyAeccType;

if(null != typeObj)...you got it!
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #18 on: December 07, 2006, 06:22:47 PM »
Kerry, this returned for a line:
;   ObjectName (RO) = "AcDbLine"

So how to get the System.Type objectClass to include the AeccDb objects? It already has the AcDb objects that can be referenced sans the AcDb........

Well that puts a spoke in that wheel ...

I'm working in the dark here Jeff, guessing games ...
Can you ask the powers that be ?

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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #19 on: December 07, 2006, 06:30:25 PM »
Jeff, can you get the different types from the object browser .. ?
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #20 on: December 07, 2006, 06:42:17 PM »
Is this pointing in the correct direction ?

(while (setq ss (ssget ":S:E" '((0 . "AECC_FEATURE_LINE"))))

... from your lisp

this is bloody frustrating, I'm tempted to download and install C3D ... [*slap*]
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #21 on: December 07, 2006, 06:44:56 PM »
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.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: C# & C3D
« Reply #22 on: December 07, 2006, 06:47:42 PM »
I'm working in the dark here Jeff, guessing games ...
Can you ask the powers that be ?
Heh, me too! :-) 

I thought I was asking those in the know by posting to the C3D.customization newsgroup. 3-4 of the programmers actually do monitor that place. I'm just a bit impatient, I guess, since it was one of them that sternly suggested I take the .NET route.

Jeff, can you get the different types from the object browser .. ?
Yes, there are a bazillion of them.....and FeatureLine is not among them. This is one area that they neglected to expose to us outsiders which is why I wrote the lisp in the first place. But since these aren't exposed, I'm guessing they cannot be cast as this specific type?.?!?

Kerry, you said I'd need to know the type even if I used a filtered selection set. Are the C# SS filters not DXF based as all others I've used are? The lisp filter is just '(0 . "AECC_FEATURE_LINE")

Thanks again to all who are helping me to step off the edge.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: C# & C3D
« Reply #23 on: December 07, 2006, 06:50:43 PM »
Is this pointing in the correct direction ?

(while (setq ss (ssget ":S:E" '((0 . "AECC_FEATURE_LINE"))))

... from your lisp

this is bloody frustrating, I'm tempted to download and install C3D ... [*slap*]
Yes, Kerry, that's what I'm thinking of doing.

NO! Do NOT install C3D unless you are a REAL glutton for punishment.......unless you are well versed in the Civil design world it will mostly be Ancient hieroglyphics to you. :|

LE

  • Guest
Re: C# & C3D
« Reply #24 on: December 07, 2006, 06:56:56 PM »
'(0 . "AECC_FEATURE_LINE")

Then if you go to the url link, I previously posted, just do:

Code: [Select]
    TypedValue[] filter = new TypedValue[1];
    Object obj = "AECC_FEATURE_LINE";
    filter[0] = new TypedValue(0, obj);
    SelectionFilter ssFilter = new SelectionFilter(filter);

and.... see if works...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #25 on: December 07, 2006, 06:58:22 PM »
For some examples, Try a search here for SelectionFilter in the NET forums


DUH, too late !
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #26 on: December 07, 2006, 07:01:21 PM »
I thought it needed a string,
ie  trying inline ...
filterlist[0] = new TypedValue(0, "AECC_FEATURE_LINE");     
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.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: C# & C3D
« Reply #27 on: December 07, 2006, 07:10:41 PM »
Another dumb ????? is there any way to save/reload a DLL other than to quit Acad and restart first? It takes like 5 minutes to shutdown and reopen C3D on this PC, kinda takes the fun out of development......

Luis, Kerry - I'm testing the SS filter once I get back to my drawing.....(see previous paragraph)  :roll:

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: C# & C3D
« Reply #28 on: December 07, 2006, 07:15:24 PM »
Woo Hoo! I can select the FeatureLines AND cast them to a Curve object, which is what I needed in order to use the the Param/Point/Deriv methods.

And since I'm using this method I think I can safeley remove all the C3D references to lower the overhead.

OK, I'm off to the races....well, tortoise races I guess.

Thanks guys!

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: C# & C3D
« Reply #29 on: December 07, 2006, 07:24:51 PM »
Another dumb ????? is there any way to save/reload a DLL other than to quit Acad and restart first? It takes like 5 minutes to shutdown and reopen C3D on this PC, kinda takes the fun out of development......

Yep, it's an unavoidable pain.

When I'm testing I start AutoCAD directly from the editor IDE [ with F5 ] and have a lisp in my custom mnl load a VSDebug.lsp I wrote which will NETLoad the DLL .. Just need to add or comment out the current/past DLL address in the VSDebug.lsp

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