See the top rated post in this thread. Click here

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: Assigning Layer +Line/Curve Style with .net API

  1. #11
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    266
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Blackbox, you are the man. Tested it out and seems to work just fine. Looks like I can just copy and paste the command function as much as I want and we're good to go?

    I'm in training today and tomorrow so I won't be able to get too into it and make sure everything works without a hitch, but I'm thinking you nailed it.

    Thanks!

    Edit: Ok so I tested it out on a blank drawing (our instructor is running late ), seems to work on parcel lines and polylines. Went into an actual plat drawing and it doesn't seem to produce the dimensions. Playing around with it some more, I don't think I have the relevant layers frozen or anything.

    Seems the second command works differently than the first (I see it's addsegmentlabelS instead of addsegmentlabel), never played around with the plural version so I'll have to dink around with it at some point. I think, at the very least, that the first command is pretty much exactly what we need. I'll report back later.

    Thanks again.
    Last edited by Varlth; 2015-09-29 at 01:57 PM.

  2. #12
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,451
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Quote Originally Posted by Varlth View Post
    Blackbox, you are the man. Tested it out and seems to work just fine. Looks like I can just copy and paste the command function as much as I want and we're good to go?

    I'm in training today and tomorrow so I won't be able to get too into it and make sure everything works without a hitch, but I'm thinking you nailed it.

    Thanks!
    That is kind of you to say, Varlth; I'm happy to help.

    I coded it to be dependent on a sub-function with parameters, so you could do just that - copy + customize the sample calling routine to build a small contingent of 'quick Segment Label commands' as needed (i.e., Sanitary, Storm, Water, Base Lines, Plats, etc.), and the dependent sub-function does all of the work for you.

    Just be mindful that the sub-function must be loaded in order for the calling functions to work - I'd suggest placing your various custom 'quick' commands and the dependent sub-function in a single LISP file, and use an AUTOLOAD Statement to demand-load the routine.

    Good luck on your training, and let me know how this works out for you.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  3. #13
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    266
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Yeah I see how the two correlate, I glanced over the dependent function and didn't see anything specific that I'd need to edit/watch out for so that's why I was looking for confirmation on just copying the command. I have a dubbed "master" routine that I put anything that doesn't affect drawing settings on load that anyone in the company can safely load by default and I was just planning to throw all of it into that file.

    I've never had to use the addsegmentlabels function though, which I see you wrote for as well. It seems to be set up to dimension an entire lot, but it's dependent on the lot's current layer instead of setting the layer you want. Interesting though, and I'll have to play around with it to see if I like it.

    Now I have to go through and make sure all my line styles are set properly in the template (and I believe one or two isn't...). I'll probably report back Thursday or Friday sometime mid day CST time.

  4. #14
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    266
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Just wanted to report back in like I said I would. Looks like it's working just as advertised now. Got the template sorted out, and going forward on future drawings this will be easy to use. I use 2016 and it works fine for me so I assume other versions shouldn't have any issue.

    Thanks again Blackbox, and thanks Opie for pointing him in the right direction!

  5. #15
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    266
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Hm...

    Some mediocre news.

    The routine works fine for the most part, but if it's used on a parcel line it grabs the parcel's layer instead of setting the layer defined in the routine. I noticed this on the segmentS command when I played with it, but now see it's happening whenever you use the command on a parcel segment.

    Any ideas on this? Normally I would think to add some sort of set layer function before the command is run, but I have the layer set to SP-PL anyways and it uses the O-PRCL layer regardless because that's the layer the lot line is on.

    Thanks

    edit: Also, I don't know if this matters much or not, but since this is being solved by lisp we could probably move this to the appropriate forum.

  6. #16
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,405
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Quote Originally Posted by Varlth View Post
    Hm...

    Some mediocre news.

    The routine works fine for the most part, but if it's used on a parcel line it grabs the parcel's layer instead of setting the layer defined in the routine. I noticed this on the segmentS command when I played with it, but now see it's happening whenever you use the command on a parcel segment.

    Any ideas on this? Normally I would think to add some sort of set layer function before the command is run, but I have the layer set to SP-PL anyways and it uses the O-PRCL layer regardless because that's the layer the lot line is on.

    Thanks

    edit: Also, I don't know if this matters much or not, but since this is being solved by lisp we could probably move this to the appropriate forum.
    Parcel labels are also a property of the ObjectLayerSettings property.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  7. #17
    I could stop if I wanted to
    Join Date
    2015-05
    Location
    West Des Moines
    Posts
    266
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    Hi Opie,

    Sorry I took awhile to get back. Had to sideline working with this cause of workload.

    I took a look at Blackbox's code, but I'm honestly lost at what to do with the ObjectLayerSettings property. I can see it being used in his code, but I have no idea where to go beyond that unfortunately.

  8. #18
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,405
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    I had not actually looked for that specific property when commenting and, unfortunately, have found that specific property is not exposed (at least in 2013) to LISP. Sorry.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  9. #19
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,451
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    I'll check newer versions here to see if they've exposed the subsequent property being requested.

    If not, the two options are to either port the earlier code to .NET in entirety, or to write a custom LispFunction Method thereby 'exposing' same.

    For reference:

    http://docs.autodesk.com/CIV3D/2016/...fdba465699.htm
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  10. #20
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,405
    Login to Give a bone
    0

    Default Re: Assigning Layer +Line/Curve Style with .net API

    2016 does not show it either.

    BTW, BB, the code you posted above for version checking of C3D could be automated to detect the active version of Civil 3D.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 2012-12-19, 03:00 PM
  2. Replies: 0
    Last Post: 2008-01-09, 09:21 PM
  3. Assigning Elevation to a Layer
    By ljupadhyay in forum ACA General
    Replies: 6
    Last Post: 2007-04-24, 07:28 PM
  4. Assigning Elevation to a Layer
    By ljupadhyay in forum ACA Wish List
    Replies: 1
    Last Post: 2007-04-24, 05:03 PM
  5. assigning layer key to new all style?
    By vanderloo5 in forum ACA General
    Replies: 0
    Last Post: 2005-06-28, 03:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •